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
fe90821f
Verified
Commit
fe90821f
authored
6 months ago
by
cyrinux
Browse files
Options
Downloads
Patches
Plain Diff
fix: static build
parent
2b0136ce
No related branches found
Tags
1.24.0+tedomum.8
Tags containing commit
No related merge requests found
Pipeline
#33244
passed
6 months ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+27
-4
27 additions, 4 deletions
Dockerfile
Makefile
+1
-1
1 addition, 1 deletion
Makefile
with
28 additions
and
5 deletions
Dockerfile
+
27
−
4
View file @
fe90821f
FROM
golang:1.22
FROM
golang:1.22
as
builder
ARG
VERSION="dev"
WORKDIR
/usr/src/app
ENV
CGO_ENABLED=0
ENV
GO111MODULE=on
COPY
go.mod go.sum ./
RUN
go mod download
&&
go mod verify
COPY
. .
RUN
make build
\
&&
mv
bin/manager /manager_amd64
\
&&
ln
-s
/manager_amd64 /manager
ENTRYPOINT
["/manager"]
&&
mv
bin/manager /manager_amd64
FROM
alpine:latest
ARG
VERSION="dev"
ENV
SUMMARY="CloudNativePG Operator Container Image." \
DESCRIPTION="This Docker image contains CloudNativePG Operator."
LABEL
summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.display-name="$SUMMARY" \
io.k8s.description="$DESCRIPTION" \
name="CloudNativePG Operator" \
vendor="CloudNativePG Contributors" \
url="https://cloudnative-pg.io/" \
version="$VERSION" \
release="1"
WORKDIR
/
RUN
apk
--no-cache
add ca-certificates tzdata
COPY
licenses /licenses
COPY
LICENSE /licenses
COPY
--from=builder /manager_amd64 /bin/
RUN
ln
-sf
/bin/manager_amd64 manager
USER
65532:65532
ENTRYPOINT
[ "/manager" ]
This diff is collapsed.
Click to expand it.
Makefile
+
1
−
1
View file @
fe90821f
...
...
@@ -32,7 +32,7 @@ COMMIT := $(shell git rev-parse --short HEAD || echo unknown)
DATE
:=
$(
shell git log
-1
--pretty
=
format:
'%ad'
--date
short
)
VERSION
:=
$(
shell git describe
--tags
--match
'v*'
|
sed
-e
's/^v//; s/-g[0-9a-f]\+$$//; s/-\([0-9]\+\)$$/-dev\1/'
)
REPLACE_VERSION
:=
$(
shell git describe
--tags
--abbrev
=
0
$(
shell git describe
--tags
--match
'v*'
--abbrev
=
0
)
^
)
LDFLAGS
=
"-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildVersion=
${
VERSION
}
$
\
LDFLAGS
=
"
-s -w
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildVersion=
${
VERSION
}
$
\
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildCommit=
${
COMMIT
}
$
\
-X github.com/cloudnative-pg/cloudnative-pg/pkg/versions.buildDate=
${
DATE
}
"
DIST_PATH
:=
$(
shell
pwd
)
/dist
...
...
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