balena-supervisor/tools/dind/Dockerfile

42 lines
1.3 KiB
Docker
Raw Normal View History

2016-06-23 14:22:23 +00:00
FROM resin/resin-base:2
VOLUME /var/lib/docker
VOLUME /resin-data
RUN apt-get update \
2016-05-08 17:01:08 +00:00
&& apt-get install -y \
ifupdown \
rsync \
dropbear \
aufs-tools \
&& rm -rf /var/lib/apt/lists/*
2016-06-23 14:22:23 +00:00
ENV DOCKER_VERSION 1.10.3
ENV RELEASE_NAME jessie
# Change to 'true' to allow blank password dropbear logins on dind HostOS
ARG PASSWORDLESS_DROPBEAR=false
COPY config/certs/ /usr/local/share/ca-certificates/
RUN rm -f /usr/local/share/ca-certificates/.keepme ; update-ca-certificates
2016-06-23 14:22:23 +00:00
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D \
&& echo deb https://apt.dockerproject.org/repo debian-${RELEASE_NAME} main > /etc/apt/sources.list.d/docker.list \
&& apt-get update || true \
&& apt-get --force-yes install docker-engine=${DOCKER_VERSION}-0~${RELEASE_NAME} \
&& rm -rf /var/lib/apt/lists/*
RUN passwd -d root
2016-06-23 14:22:23 +00:00
# Change os release to a resin-sync compatible one
RUN sed -i 's/\(PRETTY_NAME=\).*/\1"ResinOS 1.2.1+dind"/' /etc/os-release
COPY config/openvpn/ /etc/openvpn/
COPY config/dropbear/config /etc/default/dropbear
COPY config/services/ /etc/systemd/system/
COPY resin-vars vpn-init /usr/src/app/
RUN if [ "$PASSWORDLESS_DROPBEAR" = "true" ]; then sed -i 's/\(DROPBEAR_EXTRA_ARGS=\).*/\1"-B"/' /etc/default/dropbear; fi
RUN systemctl enable resin-supervisor-dind