mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-05 21:44:12 +00:00
0078c299b4
Setting DELTA_ENDPOINT as meta-resin does allows the dev dind supervisor to use the correct delta server. Inserting a VARIANT_ID into /etc/os-release allows treating this device as a dev build of Resin OS (and avoids an unhandled exception). Changing the precedence for device/provisioning apikeys in the vpn-init script allows the device to connect to the VPN when a key exchange is still pending (as meta-resin does - though this is getting replaced by watching config.json for changes). This at least makes the development supervisor functional for now, but I'll work on improving the dind setup soon. Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
43 lines
1.3 KiB
Docker
43 lines
1.3 KiB
Docker
FROM resin/resin-base:2
|
|
|
|
VOLUME /var/lib/docker
|
|
VOLUME /resin-data
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
ifupdown \
|
|
rsync \
|
|
dropbear \
|
|
aufs-tools \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
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
|
|
|
|
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
|
|
|
|
# Change os release to a resin-sync compatible one
|
|
RUN sed -i 's/\(PRETTY_NAME=\).*/\1"ResinOS 1.2.1+dind"/' /etc/os-release
|
|
RUN echo 'VARIANT_ID="dev"' >> /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
|