-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dockerfile for dsnexec and documentation (#162)
Co-authored-by: Balaji Jeevan <[email protected]>
- Loading branch information
1 parent
11d4c6f
commit bbab3d6
Showing
7 changed files
with
69 additions
and
5 deletions.
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 @@ | ||
./dsnexec |
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,26 @@ | ||
FROM golang:1.20 as builder | ||
|
||
WORKDIR /app | ||
|
||
COPY go.* ./ | ||
COPY *.go ./ | ||
COPY pkg/ pkg/ | ||
COPY cmd/ cmd/ | ||
COPY test/ test/ | ||
|
||
RUN go mod download | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /dsnexec | ||
|
||
FROM alpine:3.18 | ||
|
||
RUN apk add -U --no-cache udns libevent openssl ca-certificates postgresql-client | ||
RUN adduser -D -S -s /bin/sh dsnexec | ||
|
||
COPY --from=builder /dsnexec /usr/bin/dsnexec | ||
RUN chmod +x /usr/bin/dsnexec | ||
RUN mkdir -p /var/run/dsnexec | ||
WORKDIR /var/run/dsnexec | ||
|
||
USER dsnexec | ||
|
||
ENTRYPOINT ["/usr/bin/dsnexec"] |
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
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
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
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
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