Git Product home page Git Product logo

docker-debian-repository's Introduction

Debian-repository for Docker

A local repository for publishing deb files for use with apt.

This docker box provides an apt repository based on the tool reprepro. The repository is served by an nginx server.

Usage

Running the box

Get the box from docker's automated builds

docker pull glenux/debian-repository

Run with 22 and 80 ports opened. Share a directory containing you public SSH keys.

docker run -d -v $(pwd)/keys:/docker/keys -p 49160:22 -p 49161:80 glenux/debian-repository

Uploading packages

Fill your ~/.dput.cf with the following content :

[DEFAULT]
default_host_main = docker

[docker]
fqdn = localhost
method = scp
login = user
incoming = /docker/incoming
ssh_config_options =
        Port 49160
    	StrictHostKeyChecking no

Then upload the latest package you maintain :

$ dput ~/src/foobar_0.1.10_amd64.changes
Trying to upload package to docker
Uploading to docker (via scp to 172.17.0.152):
foobar_0.1.10_all.deb              100%   39KB  39.3KB/s   00:00    
foobar_0.1.10.dsc                  100%  488     0.5KB/s   00:00    
foobar_0.1.10.tar.gz               100%  826KB 826.0KB/s   00:00    
foobar_0.1.10_amd64.changes        100% 1488     1.5KB/s   00:00    
Successfully uploaded packages.

Accessing the repository

Add the following line to your source list

deb http://localhost:49161/debian unstable main contrib non-free

Credits

Got questions? Need help? Tweet at @glenux.

Debian-Repository for Docker is maintained and funded by Glenn Y. Rolland, aka Glenux

License

Debian-Repository for Docker is Copyright © 2014 Glenn Y. Rolland.

It is free software, and may be redistributed under the terms specified in the LICENSE file.

docker-debian-repository's People

Contributors

antontumasov avatar glenux avatar nickandrew avatar yapishu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-debian-repository's Issues

Auto-configure reprepro-distributions from environment variables

Use environment variables plus a template to generate the reprepro-distributions file.

We need :

  • EASYREPO_ORIGIN (ex: "Some Awesome Maintainer")
  • EASYREPO_LABEL (ex: "Easy Debian Repository")
  • EASYREPO_ARCHITECTURES (ex: "i386 amd64 powerpc source")
  • EASYREPO_SUITES (ex: "unstable/sid stable/buster")
  • EASYREPO_DESCRIPTION (ex: "Easy Debian Repository {{EASYREPO_SUITE}}")

That should generate something like :

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: unstable
Codename: sid
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Unstable

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: testing
Codename: jessie
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Testing

Origin: Some Awesome Maintainer
Label: Easy Debian Repository
Suite: stable
Codename: buster
Version: 3.1
Architectures: i386 amd64 powerpc source
Components: main non-free contrib
Description: Easy Debian Repository Stable

Will all imported files go into the 'unstable' distribution?

reprepro-import.sh implies it.

I need to be able to maintain multiple local distributions, in my case for ubuntu hardy, lucid and trusty. I'll need to add them into configs/reprepro-distributions but I don't see any option on dput(1) to specify the distribution name and I'm hoping it comes from the debian/changelog file.

dput configuration ssh port error

Shouldn't the ssh port configured in dput 49160 to reflect the one mapped by docker 49160->22?

	ssh_config_options =
        	Port 49160
        	StrictHostKeyChecking no

Database stored in non-persistent filespace?

Reading the reprepro manpage, the default database is +b/db which is relative to basedir, which is /var/lib/reprepro.

However the Dockerfile specifies VOLUMEs as /docker/keys and /docker/incoming so it looks like /var/lib/reprepro is not persisted across multiple starts of the image, which looks pretty wrong. The manpage for reprepro says "One has almost to regenerate the whole repository when this is lost."

I suggest moving the database and any other modified files into persistent data volumes.

The repository does not have a Release file

Adding follow repo to /etc/apt/sources.list

deb http://localhost:49161/debian unstable main contrib non-free

leads to apt update error

E: The repository 'http://localhost:49161/debian unstable Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

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.