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
81a04c19
Unverified
Commit
81a04c19
authored
Oct 30, 2023
by
Matthew Slipper
Committed by
GitHub
Oct 30, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7918 from ethereum-optimism/cl/rustc-ci
feat(ci-builder): Persist Rust toolchain in final image
parents
0f49412c
53a60ced
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
Dockerfile
ops/docker/ci-builder/Dockerfile
+14
-3
No files found.
ops/docker/ci-builder/Dockerfile
View file @
81a04c19
...
@@ -12,6 +12,9 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \
...
@@ -12,6 +12,9 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \
chmod
+x ./rustup.sh
&&
\
chmod
+x ./rustup.sh
&&
\
./rustup.sh
-y
./rustup.sh
-y
# Install nightly toolchain
RUN
source
$HOME
/.profile
&&
rustup update nightly
RUN
source
$HOME
/.profile
&&
cargo
install
just
RUN
source
$HOME
/.profile
&&
cargo
install
just
RUN
source
$HOME
/.profile
&&
cargo
install
svm-rs
RUN
source
$HOME
/.profile
&&
cargo
install
svm-rs
...
@@ -59,8 +62,12 @@ FROM --platform=linux/amd64 python:3.11.4-slim-bullseye
...
@@ -59,8 +62,12 @@ FROM --platform=linux/amd64 python:3.11.4-slim-bullseye
ENV
GOPATH=/go
ENV
GOPATH=/go
ENV
PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
ENV
PATH=/usr/local/go/bin:$GOPATH/bin:$PATH
ENV
PATH=/root/.cargo/bin:$PATH
ENV
DEBIAN_FRONTEND=noninteractive
ENV
DEBIAN_FRONTEND=noninteractive
# Create rust directories for copying the installation into
RUN
mkdir
/root/.cargo
&&
mkdir
/root/.cargo/bin
&&
mkdir
/root/.rustup
# copy the go installation, but not the module cache (cache will get stale, and would add a lot of weight)
# copy the go installation, but not the module cache (cache will get stale, and would add a lot of weight)
COPY
--from=go-build /usr/local/go /usr/local/go
COPY
--from=go-build /usr/local/go /usr/local/go
# copy tools
# copy tools
...
@@ -69,11 +76,15 @@ COPY --from=go-build /go/bin/mockery /go/bin/mockery
...
@@ -69,11 +76,15 @@ COPY --from=go-build /go/bin/mockery /go/bin/mockery
COPY
--from=go-build /go/bin/golangci-lint /go/bin/golangci-lint
COPY
--from=go-build /go/bin/golangci-lint /go/bin/golangci-lint
COPY
--from=go-build /go/bin/abigen /usr/local/bin/abigen
COPY
--from=go-build /go/bin/abigen /usr/local/bin/abigen
COPY
--from=go-build /go/bin/geth /usr/local/bin/geth
COPY
--from=go-build /go/bin/geth /usr/local/bin/geth
COPY
--from=rust-build /root/.cargo/bin/svm /usr/local/bin/svm
COPY
--from=rust-build /root/.cargo/bin/just /usr/local/bin/just
# copy the rust installation, alongside the installed toolchains
COPY
--from=rust-build /root/.cargo/bin /root/.cargo/bin
COPY
--from=rust-build /root/.rustup /root/.rustup
# copy tools
COPY
--from=rust-build /opt/foundry/target/release/forge /usr/local/bin/forge
COPY
--from=rust-build /opt/foundry/target/release/forge /usr/local/bin/forge
COPY
--from=rust-build /opt/foundry/target/release/cast /usr/local/bin/cast
COPY
--from=rust-build /opt/foundry/target/release/cast /usr/local/bin/cast
COPY
--from=rust-build /opt/foundry/target/release/anvil /usr/local/bin/anvil
COPY
--from=rust-build /opt/foundry/target/release/anvil /usr/local/bin/anvil
COPY
--from=echidna-test /usr/local/bin/echidna-test /usr/local/bin/echidna-test
COPY
--from=echidna-test /usr/local/bin/echidna-test /usr/local/bin/echidna-test
COPY
.nvmrc .nvmrc
COPY
.nvmrc .nvmrc
...
@@ -84,7 +95,7 @@ ENV SLITHER_VERSION=0.10.0
...
@@ -84,7 +95,7 @@ ENV SLITHER_VERSION=0.10.0
# note: python3 package in apt is python 3.9, while base image already has python 3.11
# note: python3 package in apt is python 3.9, while base image already has python 3.11
RUN
/bin/sh
-c
set
-eux
;
\
RUN
/bin/sh
-c
set
-eux
;
\
apt-get update
;
\
apt-get update
;
\
apt-get
install
-y
--no-install-recommends
bash curl openssh-client git build-essential ca-certificates jq gnupg binutils-mips-linux-gnu
;
\
apt-get
install
-y
--no-install-recommends
bash curl openssh-client git build-essential
pkg-config libssl-dev clang libclang-dev
ca-certificates jq gnupg binutils-mips-linux-gnu
;
\
mkdir
-p
/etc/apt/keyrings
;
\
mkdir
-p
/etc/apt/keyrings
;
\
curl
-fsSL
https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg
--dearmor
-o
/etc/apt/keyrings/nodesource.gpg
;
\
curl
-fsSL
https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg
--dearmor
-o
/etc/apt/keyrings/nodesource.gpg
;
\
echo
"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_
$NODE_MAJOR
.x nodistro main"
|
tee
/etc/apt/sources.list.d/nodesource.list
;
\
echo
"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_
$NODE_MAJOR
.x nodistro main"
|
tee
/etc/apt/sources.list.d/nodesource.list
;
\
...
...
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