Last active
November 8, 2022 03:36
-
-
Save calvin-puram/2463497bd968a2d8e383f740336ef0df to your computer and use it in GitHub Desktop.
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
FROM jrei/systemd-ubuntu:20.04 | |
ARG NIGHTLY_VERSION=nightly | |
ARG COMPOSABLE_VERSION=v2.2.1 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt update -y \ | |
&& apt-get install -y software-properties-common \ | |
&& add-apt-repository -y ppa:git-core/ppa \ | |
&& apt-get update -y \ | |
&& apt-get install -y --no-install-recommends \ | |
acl \ | |
curl \ | |
build-essential \ | |
jq \ | |
packer \ | |
python3-pip \ | |
zip \ | |
cmake \ | |
pkg-config \ | |
libssl-dev \ | |
git \ | |
clang \ | |
wget \ | |
sudo \ | |
libclang-dev \ | |
curl \ | |
supervisor \ | |
&& ln -sf /usr/bin/python3 /usr/bin/python \ | |
&& ln -sf /usr/bin/pip3 /usr/bin/pip \ | |
&& rm -rf /var/lib/apt/lists/* | |
# composable user | |
RUN adduser --disabled-password --gecos "" --uid 1000 composable \ | |
&& groupadd docker \ | |
&& usermod -aG sudo composable \ | |
&& usermod -aG docker composable \ | |
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers | |
ENV HOME=/home/composable | |
# Install Rust | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | |
export PATH="$PATH:$HOME/.cargo/bin" && \ | |
rustup default stable && \ | |
rustup update && \ | |
rustup update ${NIGHTLY_VERSION} && \ | |
rustup target add wasm32-unknown-unknown --toolchain ${NIGHTLY_VERSION} | |
# Creates directory | |
RUN mkdir -p /home/composable/data \ | |
&& chmod 0755 /home/composable/data | |
# Download composable | |
RUN wget -P /usr/local/bin https://github.com/ComposableFi/composable/releases/download/${COMPOSABLE_VERSION}/composable | |
RUN chmod 0755 /usr/local/bin | |
CMD ["/usr/bin/supervisord"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment