near/dockers: One docker image to rule them all

This commit is contained in:
Josh Siegel 2022-10-27 13:16:20 +00:00 committed by jumpsiegel
parent 9fd4c7d6e1
commit ec15d91d47
6 changed files with 16 additions and 35 deletions

View File

@ -4,8 +4,8 @@ DOCKER_BUILDKIT=1 docker build -f Dockerfile.base -t near .
# tag the image with the appropriate version
docker tag near:latest ghcr.io/wormhole-foundation/near:0.1
docker tag near:latest ghcr.io/wormhole-foundation/near:0.2
# push to ghcr
docker push ghcr.io/wormhole-foundation/near:0.1
docker push ghcr.io/wormhole-foundation/near:0.2

View File

@ -1 +1 @@
FROM ghcr.io/wormhole-foundation/near:0.1@sha256:b04512f6b2cab77615cd6d5177bb4c671fd704eb92b961e8d81a341599a5d47c as near-node
FROM ghcr.io/wormhole-foundation/near:0.2@sha256:c2089c5e93df2396d74f9c07e7cd3d76983fad97bddb202030ca442c2c00c3c2 AS near-node

View File

@ -1,12 +1,16 @@
FROM rust:1.60@sha256:48d3b5baf199dc7c378e775c47b0c40aaf7d8b23eaf67e15b095bbdaaecd1f10 as near-node
RUN rustup update
RUN apt-get install python3 --no-install-recommends
COPY node_builder.sh /tmp
FROM rust:1.60@sha256:48d3b5baf199dc7c378e775c47b0c40aaf7d8b23eaf67e15b095bbdaaecd1f10 AS near-node
WORKDIR /tmp
RUN rustup update
RUN apt-get update && apt-get install apt-utils && apt-get install -y python3 npm curl make --no-install-recommends
RUN apt-get install -y build-essential git
RUN npm i -g n
RUN n stable
COPY node_builder.sh /tmp
RUN ./node_builder.sh
COPY start_node.sh /tmp

View File

@ -1,10 +1,5 @@
FROM debian@sha256:2ce44bbc00a79113c296d9d25524e15d423b23303fdbbe20190d2f96e0aeb251 as near-contracts-build
FROM ghcr.io/wormhole-foundation/near:0.2@sha256:c2089c5e93df2396d74f9c07e7cd3d76983fad97bddb202030ca442c2c00c3c2 AS near-contracts-build
RUN apt-get update && apt-get install apt-utils && apt-get install -y python3 npm curl --no-install-recommends
RUN apt-get install -y build-essential git
ADD setup-rust.sh .
RUN ./setup-rust.sh
ADD . .
RUN make clean
RUN ./build-contracts.sh

View File

@ -1,16 +1,4 @@
FROM debian@sha256:2ce44bbc00a79113c296d9d25524e15d423b23303fdbbe20190d2f96e0aeb251 as near-contracts
# Support additional root CAs
COPY README.md cert.pem* /certs/
# Debian
RUN if [ -e /certs/cert.pem ]; then cp /certs/cert.pem /etc/ssl/certs/ca-certificates.crt; fi
# git
RUN if [ -e /certs/cert.pem ]; then git config --global http.sslCAInfo /certs/cert.pem; fi
RUN apt-get update && apt-get install apt-utils && apt-get install -y python3 npm curl --no-install-recommends
ADD setup-rust.sh .
RUN ./setup-rust.sh
FROM ghcr.io/wormhole-foundation/near:0.2@sha256:c2089c5e93df2396d74f9c07e7cd3d76983fad97bddb202030ca442c2c00c3c2 AS near-contracts
RUN mkdir -p /.npm /home/node/appa /home/node/.npm
WORKDIR /home/node/app

View File

@ -1,12 +1,6 @@
FROM debian@sha256:2ce44bbc00a79113c296d9d25524e15d423b23303fdbbe20190d2f96e0aeb251 as build
RUN apt-get update && apt-get install -y curl \
make \
build-essential
FROM ghcr.io/wormhole-foundation/near:0.2@sha256:c2089c5e93df2396d74f9c07e7cd3d76983fad97bddb202030ca442c2c00c3c2 AS build
WORKDIR /app
COPY ./setup-rust.sh .
RUN ./setup-rust.sh
COPY . .