-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathDockerfile
46 lines (37 loc) · 1.32 KB
/
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
41
42
43
44
45
46
# This Dockerfile provides a Linux-based environment, pre-installed with Solana dev tooling
# such as Rust, the Solana CLI, and the latest Soteria code scanner.
#
# You can pull the latest published image from Dockerhub (https://hub.docker.com/r/cronoslabs/dev)
# Or you can build an image from source using the Docker CLI:
# ```sh
# docker build -t cronoslabs/dev .
# ```
#
# Note: When building Docker images on an M1 Mac, you should use the `--platform linux/amd64` flag.
#
FROM ubuntu:18.04
# Set dependency versions.
ENV SOLANA_VERSION=v1.10.8
# Configure path.
ENV HOME="/root"
ENV PATH="${HOME}/.cargo/bin:${PATH}"
ENV PATH="${HOME}/.local/share/solana/install/active_release/bin:${PATH}"
ENV PATH="${HOME}/soteria-linux-develop/bin/:${PATH}"
# Install base utilities.
RUN mkdir -p /workdir && \
mkdir -p /tmp && \
apt-get update && \
apt-get upgrade && \
apt-get install -y build-essential git curl wget jq pkg-config libssl-dev libudev-dev
# Move into root.
WORKDIR ${HOME}
# Install Rust.
RUN curl "https://sh.rustup.rs" -sfo rustup.sh && \
sh rustup.sh -y && \
rustup component add rustfmt clippy
# Install Solana.
RUN sh -c "$(curl -sSfL https://release.solana.com/${SOLANA_VERSION}/install)"
# Install Soteria.
RUN sh -c "$(curl -k https://supercompiler.xyz/install)"
# Set workdir.
WORKDIR /workdir