1 Star 0 Fork 0

BuilderZou/docker-pypiserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
FROM debian:wheezy
MAINTAINER Jean-Christophe Saad-Dupuy <jc.saaddupuy@fsfe.org>
ENV DEBIAN_FRONTEND noninteractive
##########################
# system update
##########################
RUN apt-get update -qq
RUN apt-get upgrade -qq -y
##########################
##########################
# python stuffs installation
RUN apt-get install -qq -y python2.7 python-pip
##########################
##########################
# pypiserver installation
##########################
RUN pip install pypiserver
RUN pip install passlib
##########################
##########################
RUN useradd -d /home/pypiserver -m pypiserver
##########################
##########################
# create the /data folder and symlink to the default folder
##########################
RUN mkdir -p /data/packages
RUN chown -R pypiserver /data/packages
RUN ln -s /data/packages /home/pypiserver/packages
RUN chown -R pypiserver /home/pypiserver/packages
##########################
##########################
# create the /config folder and symlink to the default folder
##########################
RUN mkdir -p /config
RUN chown -R pypiserver /data/packages
##########################
VOLUME ["/data/packages", "/config"]
##########################
# exposes the default port
##########################
EXPOSE 8080
##########################
# Fix empty $HOME
ENV HOME /home/pypiserver
USER pypiserver
ADD htaccess /config/.htaccess
WORKDIR /home/pypiserver
# Always starts with the .htaccess
ENTRYPOINT ["/usr/local/bin/pypi-server", "-P", "/config/.htaccess"]
# Hack : add a CMD with default value to enable passing other options
CMD ["-p", "8080"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/builderzou/docker-pypiserver.git
git@gitee.com:builderzou/docker-pypiserver.git
builderzou
docker-pypiserver
docker-pypiserver
master

搜索帮助