Skip to content

Commit be4cffc

Browse files
committed
add /etc/pip.conf
1 parent 2847a0c commit be4cffc

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

docker/kayobe/Dockerfile

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ RUN groupadd -g $KAYOBE_USER_GID -o stack && \
6767
RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
6868

6969
RUN echo export https_proxy=$https_proxy >> /etc/environment && \
70-
echo export http_proxy=$http_proxy >> /etc/environment && \
71-
echo export PIP_CERT=/etc/pki/ca-trust/source/anchors/ZscalerRootCertificate-2048-SHA256.pem >> /etc/environment
70+
echo export http_proxy=$http_proxy >> /etc/environment && \
71+
echo export PIP_CERT=/etc/pki/ca-trust/source/anchors/ZscalerRootCertificate-2048-SHA256.pem >> /etc/environment
7272
RUN echo export https_proxy=$https_proxy >> /root/.bashrc && \
73-
echo export http_proxy=$http_proxy >> /root/.bashrc
73+
echo export http_proxy=$http_proxy >> /root/.bashrc
7474

7575
RUN python3 -m venv /opt/crudini && /opt/crudini/bin/pip install crudini===0.9.3 && \
7676
ln -s /opt/crudini/bin/crudini /usr/bin/crudini
@@ -79,12 +79,26 @@ WORKDIR /stack
7979
USER stack
8080

8181
RUN echo export https_proxy=$https_proxy >> $HOME/.bashrc && \
82-
echo export http_proxy=$http_proxy >> $HOME/.bashrc
82+
echo export http_proxy=$http_proxy >> $HOME/.bashrc
8383

8484
RUN mkdir /stack/.pip && chmod 700 /stack/.pip
8585

8686
RUN echo "[global]" >> /stack/.pip/pip.conf && \
87-
echo "proxy = $https_proxy" >> /stack/.pip/pip.conf
87+
echo "proxy = $https_proxy" >> /stack/.pip/pip.conf
88+
89+
#RUN echo "[global]" >> /etc/pip.conf && \
90+
# echo "trusted-host = pypi.python.org" >> /etc/pip.conf && \
91+
# echo " pypi.org" >> /etc/pip.conf && \
92+
# echo " files.pythonhosted.org" >> /etc/pip.conf
93+
# echo " releases.openstack.org" >> /etc/pip.conf
94+
95+
RUN tee /etc/pip.conf > /dev/null <<EOF
96+
[global]
97+
trusted-host = pypi.python.org
98+
pypi.org
99+
files.pythonhosted.org
100+
releases.openstack.org
101+
EOF
88102

89103
RUN mkdir /stack/.ssh && chmod 700 /stack/.ssh
90104
COPY --chown=stack:stack $KAYOBE_DOCKER_SSH_CONFIG_PATH /stack/.ssh/config

0 commit comments

Comments
 (0)