Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: use alpine image for xz (#15868)

Danny Xud2a8bb85d984
diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml
index cfecac3bcb..72fde4d034 100644
--- a/.github/workflows/frontend-tests.yml
+++ b/.github/workflows/frontend-tests.yml
@@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
- version: '10.7.0'
+ version: '10.8.1'
- uses: actions/setup-node@v4
with:
node-version: '23.11.0'
@@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
- version: '10.7.0'
+ version: '10.8.1'
- uses: actions/setup-node@v4
with:
node-version: '23.11.0'
diff --git a/frontend/package.json b/frontend/package.json
index 706fcbcfe8..846ff3fe39 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -167,5 +167,5 @@
"browserslist": [
"> 0.08%, not dead"
],
- "packageManager": "[email protected]"
+ "packageManager": "[email protected]"
}
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index a86153d5b8..42c00089db 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -1,6 +1,6 @@
FROM node:23.11.0-slim AS frontend
-RUN npm i -g [email protected]
+RUN npm i -g [email protected]
WORKDIR /frontend-build
@@ -42,12 +42,11 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-linux-gnu-gcc && CC_FOR_TARG
-ldflags="-w -s -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit=${GIT_COMMIT}'" \
-o bytebase ./backend/bin/server/main.go
-FROM debian:bookworm-slim AS decompressor
+FROM alpine:3.21 AS decompressor
ARG TARGETARCH
-RUN apt-get update
-RUN apt-get install -y xz-utils
+RUN apk add --no-cache xz
COPY ./backend/resources /tmp/bytebase/resources/
# These paths must match the paths in backened/resources/utils/utils_dir.go.
# The real resource dir is decided by the backend at runtime. But we can only extract these at build time.
diff --git a/scripts/Dockerfile.aws b/scripts/Dockerfile.aws
index 07170f193c..4e7fa93b24 100644
--- a/scripts/Dockerfile.aws
+++ b/scripts/Dockerfile.aws
@@ -1,6 +1,6 @@
FROM node:23.11.0-slim AS frontend
-RUN npm i -g [email protected]
+RUN npm i -g [email protected]
WORKDIR /frontend-build
@@ -42,12 +42,11 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-linux-gnu-gcc && CC_FOR_TARG
-ldflags="-w -s -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit=${GIT_COMMIT}'" \
-o bytebase ./backend/bin/server/main.go
-FROM debian:bookworm-slim AS decompressor
+FROM alpine:3.21 AS decompressor
ARG TARGETARCH
-RUN apt-get update
-RUN apt-get install -y xz-utils
+RUN apk add --no-cache xz
COPY ./backend/resources /tmp/bytebase/resources/
# These paths must match the paths in backened/resources/utils/utils_dir.go.
# The real resource dir is decided by the backend at runtime. But we can only extract these at build time.