Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CloudNative-PG
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
CloudNative-PG
Commits
42be6ee3
Verified
Commit
42be6ee3
authored
7 months ago
by
cyrinux
Browse files
Options
Downloads
Patches
Plain Diff
fix: custom Dockerfile
parent
5d3f5159
No related branches found
No related tags found
No related merge requests found
Pipeline
#32949
passed
7 months ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+10
-2
10 additions, 2 deletions
Dockerfile
with
10 additions
and
2 deletions
Dockerfile
+
10
−
2
View file @
42be6ee3
FROM
golang:1.22
AS
golangbuild
ARG
TARGETARCH
WORKDIR
/usr/src/app
COPY
go.mod go.sum ./
RUN
go mod download
&&
go mod verify
COPY
. .
RUN
make
# This builder stage it's only because we need a command
# to create a symlink and reduce the size of the image
FROM
gcr.io/distroless/static-debian1
2
:debug-nonroot
AS
builder
FROM
gcr.io/distroless/static-debian1
1
:debug-nonroot
AS
builder
ARG
TARGETARCH
SHELL
["/busybox/sh", "-c"]
COPY
--chown=nonroot:nonroot --chmod=0755
dist
/manager
/*
bin/
COPY
--from=golangbuild
--chown=nonroot:nonroot --chmod=0755
/usr/src/app/bin
/manager bin/
RUN
ln
-sf
bin/manager_
${
TARGETARCH
}
manager
FROM
gcr.io/distroless/static-debian12:nonroot
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment