-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix panic when websocket fails multiple times + add Dockerfile
- Loading branch information
Issif
committed
Apr 15, 2020
1 parent
73ad921
commit 40cbd0f
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Build image (Golang) | ||
FROM golang:alpine AS build-stage | ||
ENV GO111MODULE on | ||
ENV CGO_ENABLED 0 | ||
|
||
RUN apk add --no-cache gcc git make | ||
|
||
WORKDIR /src | ||
ADD . . | ||
|
||
RUN go mod download | ||
RUN go build -ldflags="-s -w" -o cercat | ||
|
||
# Final Docker image | ||
FROM alpine AS final-stage | ||
LABEL MAINTAINER "Thomas Labarussias <issif+github@gadz.org>" | ||
|
||
RUN apk add --no-cache ca-certificates | ||
|
||
# Create user falcosidekick | ||
RUN addgroup -S cercat && adduser -u 1234 -S cercat -G cercat | ||
USER 1234 | ||
|
||
WORKDIR ${HOME}/ | ||
COPY --from=build-stage /src/cercat . | ||
|
||
EXPOSE 2801 | ||
|
||
ENTRYPOINT ["./cercat"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters