Skip to content

Instantly share code, notes, and snippets.

@sztamas
Last active Sep 5, 2018
Embed
What would you like to do?
PYPI and HTTP proxies for development machines
docker run \
-h 'squid' --net bridge -m 0b -p 3128:8000 \
-d \
-v /srv/squid:/data \
-v /etc/localtime:/etc/localtime:ro \
-e USE_ACL=0 \
--name squid \
--restart=always \
muccg/squid-deb-proxy:latest
docker run \
-h 'devpi' --net bridge -m 0b -p 3141:3141 \
-d \
-v /srv/devpi:/data \
-v /etc/localtime:/etc/localtime:ro \
--name devpi \
--restart=always \
muccg/devpi:latest
;; OBSOLETE
[Unit]
Description=muccg/devpi Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=-/usr/bin/docker pull muccg/devpi
ExecStartPre=-/bin/mkdir -p /srv/devpi
ExecStartPre=-/bin/chown sztamas /srv/devpi
ExecStart=/usr/bin/docker run --rm --name %n -p "3141:3141" -v /srv/devpi:/data muccg/devpi
[Install]
WantedBy=default.target
;; OBSOLETE
[Unit]
Description=muccg/squid-deb-proxy Container
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStartPre=/usr/bin/docker pull muccg/squid-deb-proxy
ExecStartPre=-/bin/mkdir -p /srv/squid-deb-proxy
ExecStart=/usr/bin/docker run --rm --name %n -p "3128:8000" -e USE_ACL=0 -v /srv/squid-deb-proxy:/data muccg/squid-deb-proxy
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment