Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cb458cae
authored
Feb 11, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: disable cgo
parent
0be6c5ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
Dockerfile
+2
-11
No files found.
Dockerfile
View file @
cb458cae
...
...
@@ -9,25 +9,16 @@ RUN DISABLE_ESLINT_PLUGIN='true' VITE_REACT_APP_VERSION=$(cat VERSION) bun run b
FROM
golang:alpine AS builder2
RUN
apk add
--no-cache
\
gcc
\
musl-dev
\
sqlite-dev
\
build-base
ENV
GO111MODULE=on \
CGO_ENABLED=
1
\
CGO_ENABLED=
0
\
GOOS=linux
WORKDIR
/build
ADD
go.mod go.sum ./
RUN
go mod download
COPY
. .
COPY
--from=builder /build/dist ./web/dist
RUN
go build
-trimpath
-ldflags
"-s -w -X 'one-api/common.Version=
$(
cat
VERSION
)
' -linkmode external -extldflags '-static'"
-o
one-api
RUN
go build
-ldflags
"-s -w -X 'one-api/common.Version=
$(
cat
VERSION
)
' -extldflags '-static'"
-o
one-api
FROM
alpine
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment