Initial commit.
This commit is contained in:
commit
63539b5bc1
9 changed files with 401 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM alpine:latest as env
|
||||
|
||||
RUN apk --update add ca-certificates
|
||||
RUN addgroup -S smartswitch && adduser -S smartswitch -G smartswitch
|
||||
|
||||
|
||||
FROM golang:1.14 AS build
|
||||
|
||||
WORKDIR /src
|
||||
COPY . /src/
|
||||
RUN make
|
||||
|
||||
|
||||
FROM alpine
|
||||
|
||||
ENTRYPOINT ["/srv/smartswitch-server"]
|
||||
USER smartswitch
|
||||
|
||||
COPY --from=env /etc/passwd /etc/group /etc/
|
||||
COPY --from=build --chown=smartswitch /src/build/ /srv/
|
||||
COPY --from=env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue