Last active
May 9, 2024 23:19
-
-
Save jac18281828/ca483c3310d66a6ca82a5adc3f4e9673 to your computer and use it in GitHub Desktop.
Dockerfile for Node 14, smart contract development with Python 3.8
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 ghcr.io/collectivexyz/foundry:latest | |
RUN sudo apt update -y && sudo apt upgrade -y | |
RUN sudo apt remove python3 -y | |
RUN sudo apt autoremove -y | |
RUN sudo apt install -y wget build-essential checkinstall libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev | |
RUN mkdir -p /usr/local/src | |
RUN sudo chown -R foundry:foundry /usr/local/src | |
WORKDIR /usr/local/src | |
RUN wget https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tgz | |
RUN tar xzf Python-3.10.9.tgz && rm Python-3.10.9.tgz | |
WORKDIR /usr/local/src/Python-3.10.9 | |
RUN ./configure --enable-optimizations | |
RUN make -j 8 | |
RUN sudo make install && sudo make clean | |
ENV NODE_VERSION=v18.20.2 | |
RUN sudo bash /usr/local/etc/nvm/install.sh && \ | |
sudo bash -c ". $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default" | |
ENV NVM_NODE_PATH ${NVM_DIR}/versions/node/${NODE_VERSION} | |
ENV NODE_PATH ${NVM_NODE_PATH}/lib/node_modules | |
ENV PATH ${NVM_NODE_PATH}/bin:$PATH | |
ARG PROJECT=comet | |
WORKDIR /workspaces/${PROJECT} | |
ENV USER=foundry | |
USER foundry | |
ENV PATH=${PATH}:~/.cargo/bin:/usr/local/go/bin | |
RUN chown -R foundry:foundry . | |
COPY --chown=foundry:foundry . . | |
RUN yarn install --frozen-lockfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works with compound-finance/comet