UNCLASSIFIED - NO CUI
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
valkyrie-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform One
Party Bus
Valkyrie
valkyrie-api
Merge requests
!68
update dockerfile to use pipeline build artifact
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
update dockerfile to use pipeline build artifact
dev-fix-dockerfile
into
master
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
abrichards
requested to merge
dev-fix-dockerfile
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
87aa1227
1 commit,
3 years ago
1 file
+
1
−
25
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Dockerfile
+
1
−
25
Options
# NOTE: USING THIS IMAGE UNTIL registry1 credentials are added to IL2 runners
# Build the manager binary
FROM
registry.il2.dso.mil/platform-one/devops/pipeline-templates/valkyrie/golang-builder-1.16:1.1
as
builder
# note: Adam tried to use GOMODCACHE env variable to pull in go cache
# it worked locally but not with buildah.
WORKDIR
/workspace
# Copy the Go Modules manifests
COPY
go.mod go.sum ./
COPY
main.go main.go driver.go driver.go ./
COPY
apis/ apis/
COPY
config/ config/
COPY
custom/ custom/
COPY
resources/ resources/
COPY
controllers/ controllers/
COPY
clients/ clients/
# RUN chmod 755 go.sum
# download with json logging
# RUN go mod download -json
RUN
go mod download
# Build
RUN
CGO_ENABLED
=
0
GOOS
=
linux
GOARCH
=
amd64
GO111MODULE
=
on go build
-a
-o
manager main.go driver.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM
registry.il2.dso.mil/platform-one/devops/pipeline-templates/valkyrie/harden-valkyrie-python39:1.0
WORKDIR
/app
COPY
--from=builder /workspace/manager .
COPY
--from=builder /workspace/resources resources
COPY
.gobuild/bin/ .
USER
appuser
# run interactively `docker run -it --entrypoint bash IMAGE_NAME`
Loading