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:
root 2025-12-19 09:45:01 +08:00
parent b75a396378
commit f894bc212e
4 changed files with 6 additions and 6 deletions

View File

@ -0,0 +1 @@
{"insecure-registries":["192.168.1.154:31010"]}

View File

@ -9,15 +9,13 @@ variables:
CI_REGISTRY_USER: "docker"
CI_REGISTRY_PASSWORD: "dockerxn001624."
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# 构建镜像
build_image:
stage: build
image: alpine:latest
image: 192.168.1.154:31010/alpine:latest
script:
- 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 .
only:
- main
@ -25,7 +23,7 @@ build_image:
# 部署服务
deploy_service:
stage: deploy
image: docker/compose:latest
image: 192.168.1.154:31010/docker/compose:latest
script:
# 停止旧容器(如果存在)
- docker-compose down --remove-orphans || true

View File

@ -0,0 +1 @@
{insecure-registries:[192.168.1.154:31010]}

View File

@ -19,7 +19,7 @@ COPY . .
RUN go build -o server ./cmd/server
# Run Stage
FROM alpine:latest
FROM 192.168.1.154:31010/alpine:latest
WORKDIR /app