Skip to content

Commit c329daa

Browse files
committed
Update docker commands
1 parent b135846 commit c329daa

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

Dockerfile

+18-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ FROM ubuntu:20.04
44
# Enable "exit on error" and "pipefail" mode
55
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
66

7+
# Set non-interactive environment variables for package installation
8+
ENV DEBIAN_FRONTEND=noninteractive
9+
710
# Update package lists and install required packages
811
RUN apt-get update && apt-get install -y \
912
build-essential \
@@ -25,15 +28,28 @@ RUN wget https://go.dev/dl/go1.20.linux-amd64.tar.gz && \
2528
source ~/.bashrc
2629

2730
# Install PNPM and Yarn
31+
# Install Node.js
32+
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
33+
apt-get install -y nodejs
34+
35+
# Install PNPM
2836
RUN npm install -g pnpm
2937

3038
# Install Rust
3139
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
3240
source ~/.bashrc
3341

3442
# Install Foundry
35-
RUN curl -L https://foundry.paradigm.xyz | bash && \
36-
source ~/.bashrc
43+
RUN mkdir -p $HOME/.foundry/bin && \
44+
curl -o $HOME/.foundry/bin/foundryup https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup && \
45+
chmod +x $HOME/.foundry/bin/foundryup && \
46+
mkdir -p $HOME/.foundry/share/man/man1 && \
47+
echo >> $HOME/.bashrc && echo "export PATH=\"\$PATH:$HOME/.foundry/bin\"" >> $HOME/.bashrc && \
48+
echo "source $HOME/.bashrc" >> $HOME/.bashrc
49+
RUN export PATH="$PATH:$HOME/.foundry/bin"
50+
51+
ENV GOROOT=/usr/lib/go
52+
ENV PATH="$PATH:$HOME/.foundry/bin"
3753

3854
# Set up working directory
3955
WORKDIR /app

docker-compose.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ services:
44
build:
55
context: .
66
dockerfile: Dockerfile
7+
environment:
8+
- GOROOT=/usr/lib/go
9+
- PATH=$PATH:/root/.foundry/bin
710
volumes:
811
- ./deploy-scripts/setup.sh:/app/setup.sh
912
command: /app/setup.sh

0 commit comments

Comments
 (0)