Giter Club home page Giter Club logo

docker-pypiserver's Introduction

docker-pypiserver

pypiserver in a box

with additions from Fred Thiele [email protected]

Quick start

Launch the server

mkdir -p /tmp/pypi/packages
docker run -p 8080:8080 -v /tmp/pypi/packages:/data/packages jcsaaddupuy/pypiserver

Default config

The image comes with a default account :

  • login : admin
  • password : password

Configure setup tools

In ~/.pypirc, add the following content :

[distutils]
index-servers =
  internal

  [internal]
  repository: http://127.0.0.1:8080
  username: admin
  password: password

Upload your first package

python setup.py sdist upload -r internal

You can now browse to http://localhost:8080/simple to browse availables packages

Advanced usage

The image starts with pypi-server as main entry point, configured to use the .htaccess (see Dockerfile for details). You can pass any pypi-server option when running the container.

See schmir/pypiserver for all availables options.

Enable package overwriting

Simply pass the -o option :

docker run -p 8080:8080 -v /tmp/pypi/packages:/data/packages jcsaaddupuy/pypiserver -o

Use custom accounts

First, generate a custom .htaccess file :

htpasswd -sc /path/to/config/.htaccess account_name

Then, start the container with the folder containing the config mounted as /home/pypiserver/config :

docker run -p 8080:8080 -v /tmp/pypi/packages:/data/packages -v /path/to/config:/config jcsaaddupuy/pypiserver

Use with tox

in tox.ini, add your server in the indexserver section :

[tox]
indexserver =
    default = https://pypi.python.org/simple
    DEV = http://127.0.0.1:8080/simple

You can then use your own server pypi server to install dependancies, by prefixing the modulename with the alias given in indexserver (in our case, :DEV:) :

[testenv]
deps= :DEV:your_awesome_module

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.