mirror of
https://github.com/pushbits/server.git
synced 2025-07-23 04:03:00 +02:00
Add simplistic Dockerfile
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
.git
|
||||
Dockerfile
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM golang:latest as builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN set -ex \
|
||||
&& go get -d -v \
|
||||
&& CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
|
||||
|
||||
FROM scratch
|
||||
|
||||
WORKDIR /
|
||||
|
||||
COPY --from=builder /build/app .
|
||||
|
||||
USER 1000
|
||||
|
||||
CMD ["./app"]
|
Reference in New Issue
Block a user