2018-12-27 12:03:09 +00:00
|
|
|
FROM golang:alpine as builder
|
|
|
|
|
|
|
|
ENV DUMB_INIT_VERSION=1.2.2 \
|
2019-08-22 10:50:36 +00:00
|
|
|
YGGDRASIL_VERSION=0.3.8
|
2018-12-27 12:03:09 +00:00
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add \
|
|
|
|
build-base \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
&& git clone "https://github.com/yggdrasil-network/yggdrasil-go.git" /src \
|
|
|
|
&& cd /src \
|
|
|
|
&& git reset --hard v${YGGDRASIL_VERSION} \
|
|
|
|
&& ./build \
|
|
|
|
&& curl -sSfLo /tmp/dumb-init "https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_amd64" \
|
|
|
|
&& chmod 0755 /tmp/dumb-init
|
|
|
|
|
2019-08-14 18:44:47 +00:00
|
|
|
FROM alpine:3.10
|
2018-12-27 12:03:09 +00:00
|
|
|
|
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
|
|
|
|
|
|
|
RUN set -ex \
|
|
|
|
&& apk --no-cache add bash
|
|
|
|
|
|
|
|
COPY --from=builder /src/yggdrasil /usr/bin/
|
|
|
|
COPY --from=builder /src/yggdrasilctl /usr/bin/
|
|
|
|
COPY --from=builder /tmp/dumb-init /usr/bin/
|
|
|
|
COPY start.sh /usr/bin/
|
|
|
|
|
|
|
|
VOLUME /config
|
|
|
|
|
|
|
|
ENTRYPOINT /usr/bin/start.sh
|