-
Notifications
You must be signed in to change notification settings - Fork 255
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (43 loc) · 1.51 KB
/
Dockerfile
File metadata and controls
53 lines (43 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM node:16.13.2-slim
MAINTAINER Giorgio Regni <gr@scality.com>
WORKDIR /usr/src/app
# Keep the .git directory in order to properly report version
COPY ./package.json yarn.lock ./
ENV PYTHON=python3.9
ENV PY_VERSION=3.9.7
RUN sed -i 's|deb.debian.org/debian|archive.debian.org/debian|g' /etc/apt/sources.list \
&& sed -i 's|security.debian.org/debian-security|archive.debian.org/debian-security|g' /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
jq \
python \
git \
build-essential \
ssh \
ca-certificates \
wget \
libffi-dev \
zlib1g-dev \
&& apt-get clean \
&& mkdir -p /root/ssh \
&& ssh-keyscan -H github.com > /root/ssh/known_hosts
RUN cd /tmp \
&& wget https://www.python.org/ftp/python/$PY_VERSION/Python-$PY_VERSION.tgz \
&& tar -C /usr/local/bin -xzvf Python-$PY_VERSION.tgz \
&& cd /usr/local/bin/Python-$PY_VERSION \
&& ./configure --enable-optimizations \
&& make \
&& make altinstall \
&& rm -rf /tmp/Python-$PY_VERSION.tgz
RUN yarn cache clean \
&& yarn install --production --ignore-optional --ignore-engines --network-concurrency 1 \
&& apt-get autoremove --purge -y python git build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& yarn cache clean \
&& rm -rf ~/.node-gyp \
&& rm -rf /tmp/yarn-*
COPY ./ ./
VOLUME ["/usr/src/app/localData","/usr/src/app/localMetadata"]
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
CMD [ "yarn", "start" ]
EXPOSE 8000 8002