Skip to content

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

chore: simple-gcc (#15869)

Danny Xu4634b2221067
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index 42c00089db..8051b3e967 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -19,11 +19,7 @@ ARG GIT_COMMIT
ARG RELEASE="release"
RUN apt-get update
-RUN if [ "$TARGETARCH" = "arm64" ]; then \
- apt-get install -y gcc-aarch64-linux-gnu; \
- else \
- apt-get install -y gcc ;\
- fi
+RUN apt-get install -y gcc
RUN apt-get install -y libkrb5-dev
WORKDIR /backend-build
@@ -36,8 +32,7 @@ COPY --from=frontend /frontend-build/frontend/dist ./backend/server/dist
COPY ./scripts/VERSION .
# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information
-RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-linux-gnu-gcc && CC_FOR_TARGET=gcc-aarch64-linux-gnu; fi && \
- GOARCH=$TARGETARCH CC=$CC CC_FOR_TARGET=$CC_FOR_TARGET go build \
+RUN go build \
--tags "${RELEASE},embed_frontend,docker" \
-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
diff --git a/scripts/Dockerfile.aws b/scripts/Dockerfile.aws
index 4e7fa93b24..9bd4111241 100644
--- a/scripts/Dockerfile.aws
+++ b/scripts/Dockerfile.aws
@@ -19,11 +19,7 @@ ARG GIT_COMMIT
ARG RELEASE="release"
RUN apt-get update
-RUN if [ "$TARGETARCH" = "arm64" ]; then \
- apt-get install -y gcc-aarch64-linux-gnu; \
- else \
- apt-get install -y gcc ;\
- fi
+RUN apt-get install -y gcc
RUN apt-get install -y libkrb5-dev
WORKDIR /backend-build
@@ -36,8 +32,7 @@ COPY --from=frontend /frontend-build/frontend/dist ./backend/server/dist
COPY ./scripts/VERSION .
# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information
-RUN if [ "$TARGETARCH" = "arm64" ]; then CC=aarch64-linux-gnu-gcc && CC_FOR_TARGET=gcc-aarch64-linux-gnu; fi && \
- GOARCH=$TARGETARCH CC=$CC CC_FOR_TARGET=$CC_FOR_TARGET go build \
+RUN go build \
--tags "${RELEASE},embed_frontend,aws" \
-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