-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nikita P
committed
Oct 23, 2024
1 parent
e85efe3
commit 516f91c
Showing
2 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,15 @@ RUN corepack prepare [email protected] --activate | |
RUN poetry self update 1.8.2 | ||
|
||
|
||
# install project-defined prerequisites | ||
# copy repo file | ||
WORKDIR /home/root/scripts | ||
|
||
COPY . . | ||
|
||
# remove all temporary files to ensure correct compilation | ||
RUN rm -rf ./build/contracts/*.json | ||
|
||
|
||
# install project-defined prerequisites | ||
RUN poetry install | ||
RUN yarn | ||
RUN poetry run brownie networks import network-config.yaml True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,20 +84,23 @@ git clone [email protected]:lidofinance/scripts.git | |
cd scripts | ||
docker build -t scripts-env . | ||
``` | ||
Make sure you have set up all the ENV VARs you are using: | ||
- `PINATA_CLOUD_TOKEN`, `WEB3_INFURA_PROJECT_ID`, `DEPLOYER`, etc. | ||
- `ROOT_PASSWORD` for the ssh password | ||
Set up all the ENV VARs you are using: | ||
- `WEB3_INFURA_PROJECT_ID` required to run tests | ||
- `ROOT_PASSWORD` arbitrary password used to connect to the container ssh | ||
|
||
Run the container passing all ENV VARs you are using: | ||
Run the container (you can specify any ENV VARs you are using): | ||
```shell | ||
docker run -e ROOT_PASSWORD -e PINATA_CLOUD_TOKEN -e WEB3_INFURA_PROJECT_ID -e DEPLOYER -d -p 2222:22 scripts-env | ||
docker run -e ROOT_PASSWORD -e WEB3_INFURA_PROJECT_ID -d -p 2222:22 scripts-env | ||
``` | ||
Now connect to the running container using SSH: | ||
```shell | ||
#ssh-keygen -R [localhost]:2222 # use this if you get a 'REMOTE HOST IDENTIFICATION HAS CHANGED' error | ||
|
||
ssh root@localhost -p 2222 | ||
|
||
# type 'yes' and then <ENTER> if you are asked 'Are you sure you want to continue connecting' | ||
# use password from $ROOT_PASSWORD ENV VAR | ||
|
||
# use password specified in $ROOT_PASSWORD | ||
``` | ||
You now have a fully functional environment to run tests in, which already contains the repo from which the image was built: | ||
```shell | ||
|