Revert to using private registry for all images
- Changed .gitlab-ci.yml back to use 192.168.1.154:31010/alpine:latest and docker/compose:latest - Updated Dockerfile to use private registry alpine image - Fixed Docker installation order in CI/CD - All images now consistently use private registry 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b75a396378
commit
f894bc212e
1
%USERPROFILE%.dockerdaemon.json
Normal file
1
%USERPROFILE%.dockerdaemon.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"insecure-registries":["192.168.1.154:31010"]}
|
||||||
@ -9,15 +9,13 @@ variables:
|
|||||||
CI_REGISTRY_USER: "docker"
|
CI_REGISTRY_USER: "docker"
|
||||||
CI_REGISTRY_PASSWORD: "dockerxn001624."
|
CI_REGISTRY_PASSWORD: "dockerxn001624."
|
||||||
|
|
||||||
before_script:
|
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
|
|
||||||
# 构建镜像
|
# 构建镜像
|
||||||
build_image:
|
build_image:
|
||||||
stage: build
|
stage: build
|
||||||
image: alpine:latest
|
image: 192.168.1.154:31010/alpine:latest
|
||||||
script:
|
script:
|
||||||
- apk add --no-cache docker-cli
|
- apk add --no-cache docker-cli
|
||||||
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
- docker build -t $DOCKER_IMAGE_NAME:$DOCKER_TAG .
|
- docker build -t $DOCKER_IMAGE_NAME:$DOCKER_TAG .
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
@ -25,7 +23,7 @@ build_image:
|
|||||||
# 部署服务
|
# 部署服务
|
||||||
deploy_service:
|
deploy_service:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: docker/compose:latest
|
image: 192.168.1.154:31010/docker/compose:latest
|
||||||
script:
|
script:
|
||||||
# 停止旧容器(如果存在)
|
# 停止旧容器(如果存在)
|
||||||
- docker-compose down --remove-orphans || true
|
- docker-compose down --remove-orphans || true
|
||||||
|
|||||||
1
CUsers$USER.dockerdaemon.json
Normal file
1
CUsers$USER.dockerdaemon.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{insecure-registries:[192.168.1.154:31010]}
|
||||||
@ -19,7 +19,7 @@ COPY . .
|
|||||||
RUN go build -o server ./cmd/server
|
RUN go build -o server ./cmd/server
|
||||||
|
|
||||||
# Run Stage
|
# Run Stage
|
||||||
FROM alpine:latest
|
FROM 192.168.1.154:31010/alpine:latest
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user