-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from solarwinds/feature/papertrail-local-cert
Feature/papertrail local cert
- Loading branch information
Showing
8 changed files
with
63 additions
and
86 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
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 |
---|---|---|
|
@@ -4,4 +4,6 @@ run.sh | |
|
||
bin/ | ||
|
||
db/ | ||
db/ | ||
|
||
*.config |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
FROM golang:1.14 as main | ||
RUN adduser --disabled-login appuser | ||
FROM golang:1.14.3-alpine as main | ||
RUN apk update && apk add --no-cache git ca-certificates wget && update-ca-certificates | ||
RUN wget -O /etc/ssl/certs/papertrail-bundle.pem https://papertrailapp.com/tools/papertrail-bundle.pem | ||
WORKDIR /github.com/solarwinds/cabbage | ||
ADD . . | ||
RUN go build -ldflags="-w -s" -a -o /cabbage . | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags='-w -s -extldflags "-static"' -a -o /cabbage . | ||
|
||
FROM alpine | ||
RUN apk --update add ca-certificates | ||
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 | ||
COPY --from=main /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY --from=main /etc/ssl/certs/papertrail-bundle.pem /etc/ssl/certs/ | ||
COPY --from=main /cabbage /app/cabbage | ||
COPY --from=main /etc/passwd /etc/passwd | ||
RUN chmod -R 777 /app | ||
USER appuser | ||
USER 1001 | ||
WORKDIR /app | ||
ENTRYPOINT ./cabbage |
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 was deleted.
Oops, something went wrong.