-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathDockerfile_Environment
39 lines (32 loc) · 1.96 KB
/
Dockerfile_Environment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This Dockerfile will contain the CI environment used to run the tests and generate the wrappers.
# It would help not having to worry about the versions difference between the local setup and that of the CI
# and would avoid the issues related to wrappers generation using different versions.
# Note: this image is not build to be distributed or pushed to remote registries. Thus, it does not optimise the build layers and build stages.
#
# How to use:
# First, build the docker image using:
# $ docker build -t blobstream-env -f Dockerfile_Environment .
# Then, run the docker image:
# $ docker run -it blobstream-env
# This should give you a shell inside the image where you have all the dependencies installed.
#
# For example, if you want to generate the wrappers for this repo, run the following inside the shell:
# $ git clone https://github.com/celestiaorg/blobstream-contracts
# $ cd blobstream-contracts
# $ make
# And you will see that the wrappers are being regenerated for this repo.
# Finally, you can push the changes to your branch using git add/commit/push.
FROM ubuntu:22.04
# install necessary dependencies
RUN apt update && apt install -y git build-essential software-properties-common curl protobuf-compiler wget jq
# install forge
RUN curl -L https://foundry.paradigm.xyz | bash && . /root/.bashrc && foundryup
# install solc
RUN wget https://github.com/ethereum/solidity/releases/download/v0.8.22/solc-static-linux -O /usr/bin/solc && chmod +x /usr/bin/solc
# install go
RUN wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz && echo 'PATH=$PATH:/usr/local/go/bin:/root/go/bin' >> ~/.bashrc
# install abigen
RUN git clone --depth 1 --branch v1.12.0 https://github.com/ethereum/go-ethereum.git && cd go-ethereum && PATH=$PATH:/usr/local/go/bin make devtools
WORKDIR /root
ENTRYPOINT bash
# at this level, you can clone the blobstream-contracts repo and build the wrappers, run the tests etc.