-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile.dev
35 lines (28 loc) · 1.14 KB
/
Dockerfile.dev
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
FROM quay.io/fedora/python-311:latest
MAINTAINER "https://github.com/RedHatQE"
# HOME and APP_ROOT come from the base image - https://github.com/sclorg/s2i-python-container
# HOME=/opt/app-root/src
# APP_ROOT=/opt/app-root
ENV CLOUDWASH_DIR="${HOME}/cloudwash" \
PYCURL_SSL_LIBRARY=openssl
USER 0
RUN yum -y clean all
# Installing cloudwash
USER 1001
WORKDIR "${HOME}"
RUN git clone --depth=1 https://github.com/RedHatQE/cloudwash.git && \
cd ${CLOUDWASH_DIR} && \
pip install --upgrade pip && \
pip install . && \
cp settings.yaml.template settings.yaml
RUN /bin/bash -c 'cd ${CLOUDWASH_DIR}; for conffile in conf/*.yaml.template; do cp -- "$conffile" "${conffile%.yaml.template}.yaml"; done'
# adding .profile to environment variables, so it will be kept between shell sessions
RUN echo "source ${APP_ROOT}/.profile" >> ${APP_ROOT}/bin/activate && touch ${APP_ROOT}/.profile
# arbitrary UID handling starting from virtualenv directory for pip permissions
USER 0
RUN fix-permissions ${APP_ROOT} -P && \
git config --global --add safe.directory ${CLOUDWASH_DIR}
USER 1001
WORKDIR "${CLOUDWASH_DIR}"
ENTRYPOINT ["swach"]
CMD ["--help"]