forked from RedHatInsights/insights-rbac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.clowder
42 lines (39 loc) · 1.5 KB
/
Dockerfile.clowder
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
FROM registry.redhat.io/ubi8/python-36
ENV NODEJS_VERSION=10 \
NODEJS_SCL=rh-nodejs10 \
NPM_RUN=start \
NODEJS_SCL=rh-nodejs10 \
NPM_CONFIG_PREFIX=$HOME/.npm-global \
PATH=$HOME/.local/bin/:$HOME/node_modules/.bin/:$HOME/.npm-global/bin/:$PATH \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
PIP_NO_CACHE_DIR=off \
UPGRADE_PIP_TO_LATEST=true
LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="insights-rbac" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="python,python36,rh-python36" \
com.redhat.component="python36-docker" \
name="insights-rbac" \
version="1" \
maintainer="Red Hat Insights"
USER 0
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
COPY run_server.sh run_server.sh
RUN yum install -y git gcc python3-devel && pip3 install pipenv pip pipenv-to-requirements && pip3 install -U pip && pipenv run pipenv_to_requirements -f \
&& pip3 install -r requirements.txt && yum remove -y nodejs gcc python3-devel atlas && yum clean all
COPY rbac rbac
COPY scripts scripts
COPY openshift/s2i/bin/run run
RUN source scl_source enable rh-python36 ${NODEJS_SCL} && \
virtualenv ${APP_ROOT} && \
chown -R 1001:0 ${APP_ROOT} && \
fix-permissions ${APP_ROOT} -P && \
rpm-file-permissions && \
$STI_SCRIPTS_PATH/assemble || true
RUN touch /opt/app-root/src/rbac/app.log; chmod 777 /opt/app-root/src/rbac/app.log
USER 1001
ENTRYPOINT ["./run"]