File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed
Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ RUN apk add --no-cache -U \
3636 chown -R semaphore:0 /tmp/semaphore && \
3737 chown -R semaphore:0 /etc/semaphore && \
3838 chown -R semaphore:0 /var/lib/semaphore && \
39- chown -R semaphore:0 /opt/semaphore
39+ chown -R semaphore:0 /opt/semaphore && \
40+ find /usr/lib/python* -iname __pycache__ | xargs rm -rf
4041
4142COPY --chown=1001:0 ./deployment/docker/runner/ansible.cfg /tmp/semaphore/ansible.cfg
4243COPY --from=builder /go/src/semaphore/deployment/docker/runner/runner-wrapper /usr/local/bin/
@@ -53,11 +54,11 @@ USER 1001
5354# renovate: datasource=pypi depName=ansible
5455ENV ANSIBLE_VERSION 9.4.0
5556
56- RUN mkdir /opt/semaphore/venv
57-
58- RUN python3 -m venv /opt/semaphore/venv --system-site-packages && \
57+ RUN mkdir /opt/semaphore/venv && \
58+ python3 -m venv /opt/semaphore/venv --system-site-packages && \
5959 source /opt/semaphore/venv/bin/activate && \
60- pip3 install --upgrade pip ansible==${ANSIBLE_VERSION} boto3 botocore requests
60+ pip3 install --upgrade pip ansible==${ANSIBLE_VERSION} boto3 botocore requests && \
61+ find /opt/semaphore/venv -iname __pycache__ | xargs rm -rf
6162
6263# Preventing ansible zombie processes. Tini kills zombies.
6364ENTRYPOINT ["/sbin/tini" , "--" ]
Original file line number Diff line number Diff line change 1818
1919if test -f " ${SEMAPHORE_CONFIG_PATH} /requirements.txt" ; then
2020 echoerr " Installing additional python dependencies"
21- pip3 install --upgrade --user \
21+ pip3 install --upgrade \
2222 -r " ${SEMAPHORE_CONFIG_PATH} /requirements.txt"
2323else
2424 echoerr " No additional python dependencies to install"
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ bash curl git gnupg mysql-client openssh-client-default python3 python3-dev py3-
3636 chown -R semaphore:0 /tmp/semaphore && \
3737 chown -R semaphore:0 /etc/semaphore && \
3838 chown -R semaphore:0 /var/lib/semaphore && \
39- chown -R semaphore:0 /opt/semaphore
39+ chown -R semaphore:0 /opt/semaphore && \
40+ find /usr/lib/python* -iname __pycache__ | xargs rm -rf
4041
4142COPY --chown=1001:0 ./deployment/docker/server/ansible.cfg /tmp/semaphore/ansible.cfg
4243COPY --from=builder /go/src/semaphore/deployment/docker/server/server-wrapper /usr/local/bin/
@@ -53,11 +54,11 @@ USER 1001
5354# renovate: datasource=pypi depName=ansible
5455ENV ANSIBLE_VERSION 9.4.0
5556
56- RUN mkdir /opt/semaphore/venv
57-
58- RUN python3 -m venv /opt/semaphore/venv --system-site-packages && \
57+ RUN mkdir /opt/semaphore/venv && \
58+ python3 -m venv /opt/semaphore/venv --system-site-packages && \
5959 source /opt/semaphore/venv/bin/activate && \
60- pip3 install --upgrade pip ansible==${ANSIBLE_VERSION} boto3 botocore requests
60+ pip3 install --upgrade pip ansible==${ANSIBLE_VERSION} boto3 botocore requests && \
61+ find /opt/semaphore/venv -iname __pycache__ | xargs rm -rf
6162
6263# Preventing ansible zombie processes. Tini kills zombies.
6364ENTRYPOINT ["/sbin/tini" , "--" ]
Original file line number Diff line number Diff line change 190190
191191if test -f " ${SEMAPHORE_CONFIG_PATH} /requirements.txt" ; then
192192 echoerr " Installing additional python dependencies"
193- pip3 install --upgrade --user \
193+ pip3 install --upgrade \
194194 -r " ${SEMAPHORE_CONFIG_PATH} /requirements.txt"
195195else
196196 echoerr " No additional python dependencies to install"
You can’t perform that action at this time.
0 commit comments