mirror of
https://github.com/pushbits/server.git
synced 2025-04-28 17:56:50 +02:00
Add simplistic Dockerfile
This commit is contained in:
parent
0b7010c693
commit
470a3f819d
2 changed files with 21 additions and 0 deletions
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"]
|
Loading…
Add table
Reference in a new issue