forked from subspacecommunity/subspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (30 loc) · 818 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM golang:1.16-alpine as build
RUN apk add --no-cache \
git \
make
WORKDIR /src
COPY Makefile ./
# go.mod and go.sum if exists
COPY go.* ./
COPY cmd/ ./cmd
COPY web ./web
ARG BUILD_VERSION=unknown
ENV GODEBUG="netdns=go http2server=0"
RUN make build BUILD_VERSION=${BUILD_VERSION}
FROM alpine:3.13.4
LABEL maintainer="github.com/subspacecommunity/subspace"
COPY --from=build /src/subspace /usr/bin/subspace
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY bin/my_init /sbin/my_init
ENV DEBIAN_FRONTEND noninteractive
RUN chmod +x /usr/bin/subspace /usr/local/bin/entrypoint.sh /sbin/my_init
RUN apk add --no-cache \
iproute2 \
iptables \
ip6tables \
dnsmasq \
socat \
wireguard-tools \
runit
ENTRYPOINT ["/usr/local/bin/entrypoint.sh" ]
CMD [ "/sbin/my_init" ]