-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (33 loc) · 972 Bytes
/
Copy pathDockerfile
File metadata and controls
45 lines (33 loc) · 972 Bytes
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
41
42
43
44
45
# Base stage with Node.js, build-essential, Python, git, and necessary libraries
FROM node:18-bullseye-slim as base
RUN apt-get update && \
apt-get install --no-install-recommends -y \
build-essential \
python3 \
git \
libssl-dev \
libc6-dev \
libudev-dev && \
rm -fr /var/lib/apt/lists/* && \
rm -rf /etc/apt/sources.list.d/*
# Install Truffle and Ganache CLI
RUN npm install -g truffle ganache-cli
# Configure Git to ignore SSL certificate verification
RUN git config --global http.sslVerify false
# Truffle stage
FROM base as truffle
RUN mkdir -p /home/app
WORKDIR /home/app
COPY package.json yarn.lock /home/app/
RUN yarn install
COPY truffle-config.js /home/app/
COPY contracts /home/app/contracts/
COPY migrations /home/app/migrations/
COPY test /home/app/test/
CMD ["truffle", "version"]
# Ganache stage
FROM base as ganache
RUN mkdir -p /home
WORKDIR /home
EXPOSE 8545
ENTRYPOINT ["ganache-cli", "--host", "0.0.0.0"]