diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 1bd036c4c..efdb23dca 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -1,34 +1,11 @@ -FROM alpine:3.4 +FROM justincormack/moby-alpine-base:0d79ff85d10a7d86067a3893e8a1f52ff3a073da ENV ARCH=x86_64 RUN \ addgroup -g 50 docker && \ adduser -G docker -u 1001 -s /bin/sh -D -g "Docker" docker && \ - passwd -d root && \ - apk update && apk upgrade && \ - apk add \ - e2fsprogs \ - chrony \ - git \ - xz \ - iptables \ - sfdisk \ - lvm2 \ - syslinux \ - openrc \ - busybox-initscripts \ - alpine-conf \ - bind-tools \ - openssh-client \ - strace \ - fuse \ - util-linux \ - cifs-utils \ - e2fsprogs-extra \ - openssl \ - jq \ - && rm -rf /var/cache/apk/* + passwd -d root COPY etc /etc/ RUN mkdir -p /etc/docker diff --git a/alpine/base/.gitignore b/alpine/base/.gitignore new file mode 100644 index 000000000..b79c9762f --- /dev/null +++ b/alpine/base/.gitignore @@ -0,0 +1 @@ +hash diff --git a/alpine/base/Dockerfile b/alpine/base/Dockerfile new file mode 100644 index 000000000..fabca5a40 --- /dev/null +++ b/alpine/base/Dockerfile @@ -0,0 +1,26 @@ +FROM alpine:3.4 + +RUN \ + apk update && apk upgrade && \ + apk add \ + e2fsprogs \ + chrony \ + git \ + xz \ + iptables \ + sfdisk \ + lvm2 \ + syslinux \ + openrc \ + busybox-initscripts \ + alpine-conf \ + bind-tools \ + openssh-client \ + strace \ + fuse \ + util-linux \ + cifs-utils \ + e2fsprogs-extra \ + openssl \ + jq \ + && rm -rf /var/cache/apk/* diff --git a/alpine/base/Makefile b/alpine/base/Makefile new file mode 100644 index 000000000..90c4ea606 --- /dev/null +++ b/alpine/base/Makefile @@ -0,0 +1,26 @@ +.PHONY: tag push + +default: push + +hash: + docker pull alpine:3.4 + tar cf - Dockerfile | docker build --no-cache -t justincormack/moby-alpine-base:build - + rm -f hash + docker run justincormack/moby-alpine-base:build sha1sum /lib/apk/db/installed | sed 's/ .*//' > hash + +push: hash + docker pull justincormack/moby-alpine-base:$(shell cat hash) || \ + (docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:latest && \ + docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:$(shell cat hash) && \ + docker push justincormack/moby-alpine-base:$(shell cat hash) && \ + docker push justincormack/moby-alpine-base:latest) + rm -f hash + +tag: hash + docker pull justincormack/moby-alpine-base:$(shell cat hash) || \ + (docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:latest && \ + docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:$(shell cat hash)) + rm -f hash + +clean: + rm -f hash