Skip to content

Commit

Permalink
chore(docker): add install commands to forge docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfourzerofour committed Oct 27, 2023
1 parent 9eacbe1 commit 4df0f4b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[build]
dockerfile = "Dockerfile.forge"

pre-build = [
"apt-get -y install apt-transport-https ca-certificates",
"curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -",
"echo 'deb https://dl.yarnpkg.com/debian/ stable main' | tee /etc/apt/sources.list.d/yarn.list",
"apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn",
]
# pre-build = [
# "apt-get -y install apt-transport-https ca-certificates",
# "curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -",
# "echo 'deb https://dl.yarnpkg.com/debian/ stable main' | tee /etc/apt/sources.list.d/yarn.list",
# "apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn",
# ]
8 changes: 7 additions & 1 deletion Dockerfile.forge
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ ARG CROSS_BASE_IMAGE
FROM ghcr.io/foundry-rs/foundry:latest as foundry

FROM $CROSS_BASE_IMAGE
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge
COPY --from=foundry /usr/local/bin/forge /usr/local/bin/forge

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config protobuf-compiler nodejs yarn rsync

0 comments on commit 4df0f4b

Please sign in to comment.