-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build stage label truncation (#282)
- Loading branch information
1 parent
26c5ec7
commit e0d71e5
Showing
6 changed files
with
103 additions
and
109 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 |
---|---|---|
@@ -1,28 +1,22 @@ | ||
### TLS root certs and non-root user | ||
### TLS root certs | ||
FROM ubuntu:latest@sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9bf34594887c2c7ac AS ubuntu | ||
|
||
RUN \ | ||
# Note that the lack of a "lock" mechanism for apt dependencies | ||
# currently prevents a fully reproducible build | ||
apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
# Install TLS root certificates | ||
ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# --- | ||
|
||
FROM golang:1.18.4@sha256:6e10f44d212b24a3611280c8035edaf9d519f20e3f4d8f6f5e26796b738433da AS build | ||
FROM golang:1.18.4@sha256:6e10f44d212b24a3611280c8035edaf9d519f20e3f4d8f6f5e26796b738433da AS build-tool-dependencies | ||
RUN --mount=type=cache,from=buildcache,source=/go/pkg/mod/cache/,target=/go/pkg/mod/cache/ go build | ||
|
||
# --- | ||
|
||
### Release image | ||
FROM scratch AS release | ||
|
||
# Copy the TLS certificates for encrypted network communication | ||
COPY --from=ubuntu /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
|
||
COPY --from=build . . | ||
COPY --from=build-tool-dependencies . . | ||
|
||
ENTRYPOINT ["/example"] |
Oops, something went wrong.