Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
0aaec7c2
Unverified
Commit
0aaec7c2
authored
Aug 20, 2024
by
Matt Joiner
Committed by
GitHub
Aug 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing GOMODCACHE caching when building op-stack-go services (#11512)
parent
18ecc352
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
Dockerfile
ops/docker/op-stack-go/Dockerfile
+12
-12
No files found.
ops/docker/op-stack-go/Dockerfile
View file @
0aaec7c2
...
@@ -48,62 +48,62 @@ ARG TARGETARCH
...
@@ -48,62 +48,62 @@ ARG TARGETARCH
# "sharing" defaults to "shared", the cache will thus be available to other concurrent docker builds.
# "sharing" defaults to "shared", the cache will thus be available to other concurrent docker builds.
FROM
--platform=$BUILDPLATFORM builder AS cannon-builder
FROM
--platform=$BUILDPLATFORM builder AS cannon-builder
ARG
CANNON_VERSION=v0.0.0
ARG
CANNON_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
cannon
&&
make cannon
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
cannon
&&
make cannon
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$CANNON_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$CANNON_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-program-builder
FROM
--platform=$BUILDPLATFORM builder AS op-program-builder
ARG
OP_PROGRAM_VERSION=v0.0.0
ARG
OP_PROGRAM_VERSION=v0.0.0
# note: we only build the host, that's all the user needs. No Go MIPS cross-build in docker
# note: we only build the host, that's all the user needs. No Go MIPS cross-build in docker
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-program
&&
make op-program-host
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-program
&&
make op-program-host
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_PROGRAM_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_PROGRAM_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-heartbeat-builder
FROM
--platform=$BUILDPLATFORM builder AS op-heartbeat-builder
ARG
OP_HEARTBEAT_VERSION=v0.0.0
ARG
OP_HEARTBEAT_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-heartbeat
&&
make op-heartbeat
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-heartbeat
&&
make op-heartbeat
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_HEARTBEAT_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_HEARTBEAT_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-wheel-builder
FROM
--platform=$BUILDPLATFORM builder AS op-wheel-builder
ARG
OP_WHEEL_VERSION=v0.0.0
ARG
OP_WHEEL_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-wheel
&&
make op-wheel
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-wheel
&&
make op-wheel
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_WHEEL_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_WHEEL_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-node-builder
FROM
--platform=$BUILDPLATFORM builder AS op-node-builder
ARG
OP_NODE_VERSION=v0.0.0
ARG
OP_NODE_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-node
&&
make op-node
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-node
&&
make op-node
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_NODE_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_NODE_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-challenger-builder
FROM
--platform=$BUILDPLATFORM builder AS op-challenger-builder
ARG
OP_CHALLENGER_VERSION=v0.0.0
ARG
OP_CHALLENGER_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-challenger
&&
make op-challenger
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-challenger
&&
make op-challenger
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_CHALLENGER_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_CHALLENGER_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-dispute-mon-builder
FROM
--platform=$BUILDPLATFORM builder AS op-dispute-mon-builder
ARG
OP_DISPUTE_MON_VERSION=v0.0.0
ARG
OP_DISPUTE_MON_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-dispute-mon
&&
make op-dispute-mon
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-dispute-mon
&&
make op-dispute-mon
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_DISPUTE_MON_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_DISPUTE_MON_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-batcher-builder
FROM
--platform=$BUILDPLATFORM builder AS op-batcher-builder
ARG
OP_BATCHER_VERSION=v0.0.0
ARG
OP_BATCHER_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-batcher
&&
make op-batcher
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-batcher
&&
make op-batcher
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_BATCHER_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_BATCHER_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-proposer-builder
FROM
--platform=$BUILDPLATFORM builder AS op-proposer-builder
ARG
OP_PROPOSER_VERSION=v0.0.0
ARG
OP_PROPOSER_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-proposer
&&
make op-proposer
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-proposer
&&
make op-proposer
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_PROPOSER_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_PROPOSER_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS op-conductor-builder
FROM
--platform=$BUILDPLATFORM builder AS op-conductor-builder
ARG
OP_CONDUCTOR_VERSION=v0.0.0
ARG
OP_CONDUCTOR_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-conductor
&&
make op-conductor
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-conductor
&&
make op-conductor
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_CONDUCTOR_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_CONDUCTOR_VERSION
"
FROM
--platform=$BUILDPLATFORM builder AS da-server-builder
FROM
--platform=$BUILDPLATFORM builder AS da-server-builder
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-alt-da
&&
make da-server
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-alt-da
&&
make da-server
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
FROM
--platform=$BUILDPLATFORM builder AS op-supervisor-builder
FROM
--platform=$BUILDPLATFORM builder AS op-supervisor-builder
ARG
OP_SUPERVISOR_VERSION=v0.0.0
ARG
OP_SUPERVISOR_VERSION=v0.0.0
RUN
--mount
=
type
=
cache,target
=
/root/.cache/go-build
cd
op-supervisor
&&
make op-supervisor
\
RUN
--mount
=
type
=
cache,target
=
/
go/pkg/mod
--mount
=
type
=
cache,target
=
/
root/.cache/go-build
cd
op-supervisor
&&
make op-supervisor
\
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_SUPERVISOR_VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
GITCOMMIT
=
$GIT_COMMIT
GITDATE
=
$GIT_DATE
VERSION
=
"
$OP_SUPERVISOR_VERSION
"
FROM
--platform=$TARGETPLATFORM $TARGET_BASE_IMAGE AS cannon-target
FROM
--platform=$TARGETPLATFORM $TARGET_BASE_IMAGE AS cannon-target
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment