forked from projectatomic/atomicapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (27 loc) · 1.49 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
FROM centos:7
MAINTAINER Red Hat, Inc. <[email protected]>
ENV ATOMICAPPVERSION="0.6.2"
LABEL io.projectatomic.nulecule.atomicappversion=${ATOMICAPPVERSION} \
io.openshift.generate.job=true \
io.openshift.generate.token.as=env:TOKEN_ENV_VAR \
RUN="docker run -it --rm \${OPT1} --privileged -v \${PWD}:/atomicapp -v /run:/run -v /:/host --net=host --name \${NAME} -e USER -e SUDO_USER -e NAME=\${NAME} -e IMAGE=\${IMAGE} \${IMAGE} \${OPT2} run \${OPT3}" \
STOP="docker run -it --rm \${OPT1} --privileged -v \${PWD}:/atomicapp -v /run:/run -v /:/host --net=host --name \${NAME} -e USER -e SUDO_USER -e NAME=\${NAME} -e IMAGE=\${IMAGE} \${IMAGE} \${OPT2} stop \${OPT3}"
WORKDIR /opt/atomicapp
# Add the requirements file into the container
ADD requirements.txt ./
# Install needed requirements
RUN yum install -y epel-release && \
yum install -y --setopt=tsflags=nodocs docker && \
yum install -y --setopt=tsflags=nodocs $(sed s/^/python-/ requirements.txt) && \
yum clean all
WORKDIR /atomicapp
# If a volume doesn't get mounted over /atomicapp (like when running in
# an openshift pod) then open up permissions so files can be copied into
# the directory by non-root.
RUN chmod 777 /atomicapp
ENV PYTHONPATH /opt/atomicapp/
# the entrypoint
ENTRYPOINT ["/usr/bin/python", "/opt/atomicapp/atomicapp/cli/main.py"]
# Add all of Atomic App's files to the container image
# NOTE: Do this last so rebuilding after development is fast
ADD atomicapp/ /opt/atomicapp/atomicapp/