From b4e1e31e3187edfcf8fcdc123ed48c1237282495 Mon Sep 17 00:00:00 2001 From: somunslotus Date: Mon, 31 Mar 2025 17:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=81=9A=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E7=9A=84=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 7 ++++--- build-image.sh | 8 ++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 build-image.sh diff --git a/Dockerfile b/Dockerfile index 4201d7d..db50dc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine as nodebuilder +FROM 172.20.32.187/tempimagefile/node:18-alpine as nodebuilder LABEL stage=nodebuilder # Set the working directory to /app WORKDIR /web @@ -7,6 +7,7 @@ COPY package.json /web/ # Install any needed packages RUN npm cache clear --force +RUN npm config set registry https://registry.npmmirror.com/ RUN npm install COPY . /web/ @@ -14,7 +15,7 @@ COPY . /web/ ENV NODE_OPTIONS=--max_old_space_size=2048 RUN npm run build -FROM golang:1.21-alpine AS gobuilder +FROM 172.20.32.187/tempimagefile/golang:1.21-alpine AS gobuilder LABEL stage=gobuilder @@ -29,7 +30,7 @@ RUN go mod download RUN apk add build-base RUN go build -ldflags="-s -w" -o /server/server /server/api/studio/studio.go -FROM alpine +FROM 172.20.32.187/tempimagefile/alpine:latest WORKDIR /app COPY --from=gobuilder /server/server /app/server diff --git a/build-image.sh b/build-image.sh new file mode 100644 index 0000000..4ac65b5 --- /dev/null +++ b/build-image.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +tag=$(date +%Y%m%d%H%M%S) + +image=172.20.32.187/pipeline-service/nebula-graph-studio:${tag} +docker build -t ${image} . + +docker push image \ No newline at end of file