Explorar o código

near/dockers: One docker image to rule them all

Josh Siegel %!s(int64=3) %!d(string=hai) anos
pai
achega
ec15d91d47
Modificáronse 6 ficheiros con 14 adicións e 33 borrados
  1. 2 2
      near/Docker.md
  2. 1 1
      near/Dockerfile
  3. 8 4
      near/Dockerfile.base
  4. 1 6
      near/Dockerfile.build
  5. 1 13
      near/Dockerfile.contracts
  6. 1 7
      near/Dockerfile.deploy

+ 2 - 2
near/Docker.md

@@ -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

+ 1 - 1
near/Dockerfile

@@ -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

+ 8 - 4
near/Dockerfile.base

@@ -1,11 +1,15 @@
-FROM rust:1.60@sha256:48d3b5baf199dc7c378e775c47b0c40aaf7d8b23eaf67e15b095bbdaaecd1f10 as near-node
+FROM rust:1.60@sha256:48d3b5baf199dc7c378e775c47b0c40aaf7d8b23eaf67e15b095bbdaaecd1f10 AS near-node
+
+WORKDIR /tmp
 
 RUN rustup update
-RUN apt-get install python3 --no-install-recommends
+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
 
-COPY node_builder.sh /tmp
+RUN npm i -g n
+RUN n stable
 
-WORKDIR /tmp
+COPY node_builder.sh /tmp
 
 RUN ./node_builder.sh
 

+ 1 - 6
near/Dockerfile.build

@@ -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

+ 1 - 13
near/Dockerfile.contracts

@@ -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

+ 1 - 7
near/Dockerfile.deploy

@@ -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 . .