Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob Helmecke committed Jun 14, 2018
0 parents commit ce32d56
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM debian:stretch-slim

ENV DUMB_INIT_VERSION 1.2.1

COPY bin/ /usr/local/bin/

RUN set -x && \
clean-install procps curl ca-certificates && \
curl -sL https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64 -o /usr/local/bin/dumb-init && \
chmod +x /usr/local/bin/dumb-init && \
clean-uninstall curl ca-certificates

ENTRYPOINT ["/usr/local/bin/dumb-init"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# debian-base

Docker image based on debian slim. Added install, uninstall scripts and
dumb-init.
18 changes: 18 additions & 0 deletions bin/clean-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

set -o errexit

if [ $# = 0 ]; then
echo >&2 "No packages specified"
exit 1
fi

apt-get update
apt-get install -y --no-install-recommends $@
apt-get clean -y
rm -rf \
/var/cache/debconf/* \
/var/lib/apt/lists/* \
/var/log/* \
/tmp/* \
/var/tmp/*
17 changes: 17 additions & 0 deletions bin/clean-uninstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -o errexit

if [ $# = 0 ]; then
echo >&2 "No packages specified"
exit 1
fi

apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $@
apt-get clean -y
rm -rf \
/var/cache/debconf/* \
/var/lib/apt/lists/* \
/var/log/* \
/tmp/* \
/var/tmp/*

0 comments on commit ce32d56

Please sign in to comment.