forked from BankaiNoJutsu/subspace
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
46 lines (33 loc) · 926 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
44
45
46
FROM golang:1.14 as build
RUN apt-get update \
&& apt-get install -y git make \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY Makefile ./
# go.mod and go.sum if exists
COPY go.* ./
COPY *.go ./
COPY static ./static
COPY templates ./templates
COPY email ./email
ARG BUILD_VERSION=unknown
ENV GODEBUG="netdns=go http2server=0"
RUN make BUILD_VERSION=${BUILD_VERSION}
FROM alpine:3.11.6
LABEL maintainer="github.com/subspacecommunity/subspace"
COPY --from=build /src/subspace-linux-amd64 /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 \
perl
ENTRYPOINT ["/usr/local/bin/entrypoint.sh" ]
CMD [ "/sbin/my_init" ]