-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multistage build (enhancement) (#447)
- Loading branch information
1 parent
a70c527
commit 17caf86
Showing
5 changed files
with
49 additions
and
12 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,21 @@ | ||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Repo config | ||
.git | ||
|
||
# IDE configs | ||
.vscode | ||
.idea | ||
|
||
# Environment variables | ||
.env | ||
|
||
# Other | ||
website | ||
grafana | ||
integration_test | ||
prometheus |
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 |
---|---|---|
@@ -1,10 +1,17 @@ | ||
FROM ubuntu:22.04 | ||
RUN apt-get update | ||
RUN apt-get install -y curl apt-transport-https | ||
RUN apt-get clean | ||
FROM golang:1.21-bullseye AS builder | ||
RUN apt-get update && apt-get install | ||
ADD . /signatory | ||
WORKDIR /signatory | ||
RUN make | ||
|
||
COPY ./signatory /bin | ||
COPY ./signatory-cli /bin | ||
|
||
ENTRYPOINT ["/bin/signatory"] | ||
FROM debian:buster-slim | ||
WORKDIR /signatory | ||
RUN apt update -y \ | ||
&& apt install -y curl apt-transport-https\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
COPY --from=builder /signatory/signatory.yaml /signatory/signatory.yaml | ||
COPY --from=builder /signatory/signatory /usr/bin/signatory | ||
COPY --from=builder /signatory/signatory-cli /usr/bin/signatory-cli | ||
|
||
ENTRYPOINT ["/usr/bin/signatory"] | ||
CMD [ "-c", "/signatory/signatory.yaml" ] |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ubuntu:22.04 | ||
RUN apt-get update | ||
RUN apt-get install -y curl apt-transport-https | ||
RUN apt-get clean | ||
|
||
COPY ./signatory /bin | ||
COPY ./signatory-cli /bin | ||
|
||
ENTRYPOINT ["/bin/signatory"] |