From f46d75fcb02593183600c7429f0d50ac41445ac5 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Tue, 12 Aug 2014 23:04:26 +0200 Subject: [PATCH] Initial import. --- Dockerfile | 18 ++++++++++++++++++ Makefile | 4 ++++ README.md | 14 ++++++++++++++ scripts/start.sh | 15 +++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 README.md create mode 100644 scripts/start.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..15c5ef9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM debian:testing +MAINTAINER Glenn Y. Rolland + +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update +RUN apt-get install -q -y supervisor +RUN apt-get install -q -y reprepro + +ENV DEBIAN_FRONTEND newt +VOLUME /data + +ADD scripts/start.sh /start.sh + +EXPOSE 80 +EXPOSE 22 +CMD ["/bin/bash", "/start.sh"] + + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0165b0c --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ + +build: + docker build -t glenux/debian-repo . + diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb9db2f --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +docker-debian-repository +======================== + +References +---------- + +### Tutorials + +* https://www.isalo.org/wiki.debian-fr/Reprepro +* http://www.howtoforge.com/setting-up-an-apt-repository-with-reprepro-and-nginx-on-debian-wheezy +* http://doc.ubuntu-fr.org/tutoriel/comment_creer_depot +* http://mirrorer.alioth.debian.org/ +* https://wiki.debian.org/SettingUpSignedAptRepositoryWithReprepro +* https://www.isalo.org/wiki.debian-fr/Reprepro diff --git a/scripts/start.sh b/scripts/start.sh new file mode 100644 index 0000000..b42681a --- /dev/null +++ b/scripts/start.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Many thanks to John Fink for the +# inspiration and to his great work on docker-wordpress' + +# let's create a user to ssh into +SSH_USERPASS=`pwgen -c -n -1 8` +mkdir /home/user +useradd -G sudo -d /home/user user +chown user /home/user +echo user:$SSH_USERPASS | chpasswd +echo ssh user password: $SSH_USERPASS + +supervisord -n +