2016-06-23 14:22:23 +00:00
|
|
|
FROM resin/resin-base:2
|
2015-06-02 12:47:33 +00:00
|
|
|
|
|
|
|
VOLUME /var/lib/docker
|
2015-07-28 21:10:17 +00:00
|
|
|
VOLUME /resin-data
|
|
|
|
|
2015-10-06 14:32:19 +00:00
|
|
|
RUN apt-get update \
|
2016-05-08 17:01:08 +00:00
|
|
|
&& apt-get install -y \
|
|
|
|
ifupdown \
|
|
|
|
rsync \
|
2016-05-08 15:59:19 +00:00
|
|
|
dropbear \
|
2017-04-25 22:18:30 +00:00
|
|
|
aufs-tools \
|
2015-10-06 14:32:19 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2016-06-23 14:22:23 +00:00
|
|
|
ENV DOCKER_VERSION 1.10.3
|
|
|
|
ENV RELEASE_NAME jessie
|
2015-10-06 14:32:19 +00:00
|
|
|
|
2016-05-08 15:59:19 +00:00
|
|
|
# Change to 'true' to allow blank password dropbear logins on dind HostOS
|
2016-07-05 09:57:37 +00:00
|
|
|
ARG PASSWORDLESS_DROPBEAR=false
|
2016-05-08 15:59:19 +00:00
|
|
|
|
2016-06-28 19:46:27 +00:00
|
|
|
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} \
|
2015-06-02 12:47:33 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-07-10 16:37:36 +00:00
|
|
|
ENV DIND_COMMIT 3b5fac462d21ca164b3778647420016315289034
|
|
|
|
RUN curl -sL https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind > /usr/bin/dind \
|
|
|
|
&& chmod +x /usr/bin/dind
|
|
|
|
|
2016-05-08 15:59:19 +00:00
|
|
|
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
|
2017-06-27 00:17:25 +00:00
|
|
|
RUN echo 'VARIANT_ID="dev"' >> /etc/os-release
|
2016-06-23 14:22:23 +00:00
|
|
|
|
2015-06-02 12:47:33 +00:00
|
|
|
COPY config/openvpn/ /etc/openvpn/
|
2016-05-08 15:59:19 +00:00
|
|
|
COPY config/dropbear/config /etc/default/dropbear
|
2015-06-02 12:47:33 +00:00
|
|
|
COPY config/services/ /etc/systemd/system/
|
2015-09-07 19:51:00 +00:00
|
|
|
COPY resin-vars vpn-init /usr/src/app/
|
2015-06-02 12:47:33 +00:00
|
|
|
|
2016-05-08 15:59:19 +00:00
|
|
|
RUN if [ "$PASSWORDLESS_DROPBEAR" = "true" ]; then sed -i 's/\(DROPBEAR_EXTRA_ARGS=\).*/\1"-B"/' /etc/default/dropbear; fi
|
|
|
|
|
2015-06-02 12:47:33 +00:00
|
|
|
RUN systemctl enable resin-supervisor-dind
|
2017-07-10 16:37:36 +00:00
|
|
|
|
|
|
|
COPY supervisor-image.tar /usr/src/
|