🐳Update docker build script

This commit is contained in:
zhengyi59 2024-03-02 09:03:01 -05:00
parent 279cf05ac2
commit 6142653b3e
5 changed files with 19 additions and 12 deletions

View File

@ -7,3 +7,8 @@ Project Monika 仅为该项目代号, 并非是项目名称,项目名称还
## 📄 TODO
- [ ] 添加图标
## BACK
`--platform linux/amd64,linux/arm64,linux/arm/v7`

View File

@ -1,7 +1,7 @@
version: "3.8"
services:
dockge:
image: louislam/dockge:1
image: git.mczhengyi.top/zhengyi/dockge:nightly
restart: unless-stopped
ports:
# Host Port : Container Port
@ -9,7 +9,10 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/app/data
# Docker data dir
- /opt/docker:/opt/docker
# If you want to use private registries, you need to share the auth file with Dockge:
# - /root/.docker/:/root/.docker

View File

@ -1,12 +1,12 @@
############################################
# Healthcheck Binary
############################################
FROM louislam/dockge:build-healthcheck AS build_healthcheck
FROM git.mczhengyi.top/zhengyi/dockge:build-healthcheck AS build_healthcheck
############################################
# Build
############################################
FROM louislam/dockge:base AS build
FROM git.mczhengyi.top/zhengyi/dockge:base AS build
WORKDIR /app
COPY --chown=node:node ./package.json ./package.json
COPY --chown=node:node ./pnpm-lock.yaml ./pnpm-lock.yaml
@ -15,7 +15,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-l
############################################
# ⭐ Main Image
############################################
FROM louislam/dockge:base AS release
FROM git.mczhengyi.top/zhengyi/dockge:base AS release
WORKDIR /app
COPY --chown=node:node --from=build_healthcheck /app/extra/healthcheck /app/extra/healthcheck
COPY --from=build /app/node_modules /app/node_modules

View File

@ -16,7 +16,6 @@ declare module 'vue' {
BModal: typeof import('bootstrap-vue-next')['BModal']
Confirm: typeof import('./src/components/Confirm.vue')['default']
Container: typeof import('./src/components/Container.vue')['default']
File: typeof import('./src/components/File.vue')['default']
FileEditor: typeof import('./src/components/FileEditor.vue')['default']
FileItem: typeof import('./src/components/FileItem.vue')['default']
General: typeof import('./src/components/settings/General.vue')['default']

View File

@ -16,12 +16,12 @@
"release-final": "tsx ./extra/test-docker.ts && tsx extra/update-version.ts && pnpm run build:frontend && npm run build:docker",
"release-beta": "tsx ./extra/test-docker.ts && tsx extra/update-version.ts && pnpm run build:frontend && npm run build:docker-beta",
"build:frontend": "vite build --config ./frontend/vite.config.ts",
"build:docker-base": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:base -f ./docker/Base.Dockerfile . --push",
"build:docker": "node ./extra/env2arg.js docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:latest -t louislam/dockge:1 -t louislam/dockge:$VERSION -t louislam/dockge:beta -t louislam/dockge:nightly --target release -f ./docker/Dockerfile . --push",
"build:docker-beta": "node ./extra/env2arg.js docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:beta -t louislam/dockge:$VERSION --target release -f ./docker/Dockerfile . --push",
"build:docker-nightly": "pnpm run build:frontend && docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:nightly --target nightly -f ./docker/Dockerfile . --push",
"build:healthcheck": "docker buildx build -f docker/BuildHealthCheck.Dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/dockge:build-healthcheck . --push",
"start-docker": "docker run --rm -p 5001:5001 --name dockge louislam/dockge:latest",
"build:docker-base": "docker build -t git.mczhengyi.top/zhengyi/dockge:base -f ./docker/Base.Dockerfile . --push",
"build:docker": "node ./extra/env2arg.js docker build -t git.mczhengyi.top/zhengyi/dockge:latest -t git.mczhengyi.top/zhengyi/dockge:1 -t git.mczhengyi.top/zhengyi/dockge:$VERSION -t git.mczhengyi.top/zhengyi/dockge:beta -t git.mczhengyi.top/zhengyi/dockge:nightly --target release -f ./docker/Dockerfile . --push",
"build:docker-beta": "node ./extra/env2arg.js docker build -t git.mczhengyi.top/zhengyi/dockge:beta -t git.mczhengyi.top/zhengyi/dockge:$VERSION --target release -f ./docker/Dockerfile . --push",
"build:docker-nightly": "pnpm run build:frontend && docker build -t git.mczhengyi.top/zhengyi/dockge:nightly --target nightly -f ./docker/Dockerfile . --push",
"build:healthcheck": "docker build -f docker/BuildHealthCheck.Dockerfile -t git.mczhengyi.top/zhengyi/dockge:build-healthcheck . --push",
"start-docker": "docker run --rm -p 5001:5001 --name dockge git.mczhengyi.top/zhengyi/dockge:latest",
"mark-as-nightly": "tsx ./extra/mark-as-nightly.ts",
"reformat-changelog": "tsx ./extra/reformat-changelog.ts",
"reset-password": "tsx ./extra/reset-password.ts"