Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 289bbe3f0d | |||
| bec6a93b65 | |||
| e2a41fc187 | |||
| c7a04f3857 |
@@ -42,10 +42,6 @@ jobs:
|
||||
run: |
|
||||
echo "Current directory is $PWD"
|
||||
ls -al
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
||||
+4
-1
@@ -1,4 +1,5 @@
|
||||
FROM golang:alpine AS backend-builder
|
||||
RUN apk add --no-cache build-base
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
ENV CGO_ENABLED=1
|
||||
@@ -8,7 +9,9 @@ RUN apk add --no-cache upx
|
||||
|
||||
RUN upx --best --lzma bin/server
|
||||
|
||||
FROM alpine:latest
|
||||
# 使用带有 glibc 的 Alpine 变体
|
||||
FROM frolvlad/alpine-glibc:alpine-3.19
|
||||
RUN apk add --no-cache libstdc++
|
||||
COPY --from=backend-builder /build/bin/server /app/server
|
||||
COPY static /app/static
|
||||
COPY static/*.so /app/
|
||||
|
||||
Reference in New Issue
Block a user