-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
40 lines (31 loc) · 851 Bytes
/
Dockerfile
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
40
# Use Ubuntu as base image
FROM ubuntu:22.04
# Prevent tzdata questions during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install necessary packages
RUN apt-get update && \
apt-get install -y \
curl \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Foundry
RUN curl -L https://foundry.paradigm.xyz | bash && \
~/.foundry/bin/foundryup
# Add Foundry binaries to PATH
ENV PATH="/root/.foundry/bin:${PATH}"
# Set the working directory
WORKDIR /app
# Set git config
RUN git config --global user.email "[email protected]" && \
git config --global user.name "Workshop User"
# Initialize git and set up the project
COPY . .
RUN git init && \
git add . && \
git commit -m "Initial commit" && \
forge install
# Build the project
RUN forge build
# Command to run when container starts
CMD ["bash"]