forked from project-koku/koku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (42 loc) · 1.52 KB
/
Dockerfile
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
54
55
56
57
58
FROM registry.access.redhat.com/ubi8/python-38:latest
ARG PIPENV_DEV=False
ARG USER_ID=1000
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
PIP_NO_CACHE_DIR=off \
ENABLE_PIPENV=true \
PIN_PIPENV_VERSION="2018.11.26" \
APP_HOME="/opt/app-root/src/koku" \
APP_MODULE="koku.wsgi" \
APP_CONFIG="gunicorn_conf.py" \
DISABLE_MIGRATE=true \
DJANGO_READ_DOT_ENV_FILE=false
ENV SUMMARY="Koku is the Cost Management application" \
DESCRIPTION="Koku is the Cost Management application"
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Koku" \
io.openshift.expose-services="8000:http" \
io.openshift.tags="builder,python,python38,rh-python38" \
com.redhat.component="python38-docker" \
name="Koku" \
version="1" \
maintainer="Red Hat Cost Management Services"
USER root
COPY ./.s2i/bin/ $STI_SCRIPTS_PATH
# Copy application files to the image.
COPY . /tmp/src/.
RUN /usr/bin/fix-permissions /tmp/src && \
curl -L -o /usr/bin/haberdasher https://github.com/RedHatInsights/haberdasher/releases/latest/download/haberdasher_linux_amd64 && \
chmod 755 /usr/bin/haberdasher $STI_SCRIPTS_PATH/assemble $STI_SCRIPTS_PATH/run
RUN groupadd -g ${USER_ID} koku \
&& useradd -m -s /bin/bash -g ${USER_ID} -u ${USER_ID} -G root koku \
&& chmod g+rwx /opt
USER koku
RUN umask u=rwx,g=rwx,o=rx
EXPOSE 8080
RUN $STI_SCRIPTS_PATH/assemble
ENTRYPOINT ["/usr/bin/haberdasher"]
# Set the default CMD
CMD $STI_SCRIPTS_PATH/run