cybozu-go / aptutil

Go utilities for Debian APT repositories
MIT License
124 stars 29 forks source link

Official docker image #31

Closed jacksgt closed 6 years ago

jacksgt commented 6 years ago

Over at https://github.com/jacksgt/docker-aptutil I have created a Dockerfile for aptutil.

It includes both go-apt-cacher and go-apt-mirror.


Usage is rather simple:

go-apt-mirror

Mount the configuration file for go-apt-cacher to /etc/go-apt-cacher.toml (read-only for added security).

Optionally, mount /var/spool/go-apt-cacher for persistence (required for --read-only).

$ docker container run \
    --read-only \
    -v /etc/go-apt-cacher.toml:/etc/go-apt-cacher.toml:ro \
    -v /var/spool/go-apt-cacher:/var/spool/go-apt-cacher \
    jacksgt/aptutil /go-apt-cacher

go-apt-mirror

Mount the configuration file for go-apt-cacher to /etc/apt/mirror.toml (read-only for added security).

Mount /var/spool/go-apt-mirror to store the mirrored files permanently (required for --read-only).

$ docker container run \
    --read-only \
    -v /etc/go-apt-mirror.toml:/etc/apt/mirror.toml:ro \
    -v /var/spool/go-apt-mirror:/var/spool/go-apt-mirror \
    jacksgt/aptutil /go-apt-mirror

Are you interested in merging this into your repository? If so, it would be great if you created a DockerHub account and set up an automatic build. That way, the image will be automatically built each time someone pushes into the source repo. By 'linking' against the golang docker image repository you can also ensure the image is rebuilt when there is a new version of the golang image ("Repository Links"). See https://hub.docker.com/r/jacksgt/docker-aptutil/

ymmt2005 commented 6 years ago

Great! But we are not very familiar with Docker and Docker Hub.

I'd like to propose adding a link to your project in README.md until we get ready for Docker things. What do you think? @jacksgt

jacksgt commented 6 years ago

Sure, sounds good to me!

See https://github.com/cybozu-go/aptutil/pull/33