Skip to content

Commit fd6cc99

Browse files
Adds a dockerfile
1 parent 8d65839 commit fd6cc99

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM golang:alpine
2+
ENV CGO_ENABLED 0
3+
RUN apk add --update ca-certificates alpine-sdk
4+
COPY . /build
5+
WORKDIR /build
6+
RUN make
7+
8+
FROM scratch
9+
MAINTAINER Thomas Maurice <[email protected]>
10+
COPY --from=0 /build/bin/server /server
11+
# probably dont need the cli here
12+
# COPY --from=0 /build/bin/cli /cli
13+
COPY --from=0 /etc/ca-certificates /etc/ca-certificates

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ all:
22
if ! [ -d bin ]; then mkdir bin; fi
33
go build -v -o ./bin/server ./server
44
go build -v -o ./bin/cli ./cli
5+
6+
7+
docker:
8+
docker build -t dnsbin2-server .

0 commit comments

Comments
 (0)