Created
July 30, 2020 14:10
-
-
Save Luttik/ec8aad6ce43a26d81081c6f9df758452 to your computer and use it in GitHub Desktop.
Revisions
-
Luttik created this gist
Jul 30, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ FROM python:latest COPY .htpasswd "/.htpasswd" RUN python3 -m pip install --upgrade pip RUN pip3 install pypiserver[passlib] RUN apt-get update RUN apt-get install lsb-release -y dos2unix RUN echo "deb http://packages.cloud.google.com/apt gcsfuse-buster main" | \ tee /etc/apt/sources.list.d/gcsfuse.list RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - RUN mkdir -p /data/packages RUN apt-get update RUN apt-get install gcsfuse -y COPY start.sh pypi-bucket-editor-credentials.json / ENV GOOGLE_APPLICATION_CREDENTIALS "/pypi-bucket-editor-credentials.json" RUN dos2unix /start.sh RUN chmod +x /start.sh ENTRYPOINT ["/start.sh"] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ #!/bin/bash gcsfuse techonomy-pypi /data/packages python3 -m pypiserver -P /.htpasswd -a update,download,list /data/packages