-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (31 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
41 lines (31 loc) · 1.09 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
FROM python:3.9.23-alpine
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Least privilege: Run as a non-root user.
ENV USER=appstore
ENV APP_HOME=/usr/src/inst-mgmt
ENV HOME=/home/$USER
ENV UID=1000
RUN mkdir $APP_HOME
RUN set -x && \
apk add --no-cache make git bash build-base xmlsec libxml2-dev linux-headers openssl && \
adduser -D -s /bin/bash -h $HOME -u $UID $USER && \
chown -R $UID:$UID $APP_HOME
# Removing but leaving commented in case Tycho needs this for swagger.
# Version 3.3.1 currently, if not complaints v3.3.3 this can be
# completely removed.
# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash
# RUN apt-get install -y nodejs
WORKDIR $APP_HOME
COPY --chown=$UID:$UID . .
RUN chown -R $USER:0 $APP_HOME && \
chmod -R g+w $APP_HOME
RUN if [ -d whl -a "$(ls -A whl/*.whl)" ]; then pip install whl/*.whl; fi
RUN export SET_BUILD_ENV_FROM_FILE=false \
&& pip install "cython<3.0.0" wheel \
&& pip install "pyyaml==5.4.1" --no-build-isolation \
&& make install \
&& unset SET_BUILD_ENV_FROM_FILE
USER $USER
EXPOSE 8000
CMD ["make","start"]