FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Gokapi/Dockerfile at master · Obolensky-dev/Gokapi · GitHub
Obolensky-dev
/
Gokapi
Public
forked from
Forceu/Gokapi
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Gokapi
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (19 loc) · 1.05 KB
Breadcrumbs
Gokapi
/
Dockerfile
Copy path
File metadata and controls
30 lines (19 loc) · 1.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM
golang:1.24.0-alpine AS build_base
#
# Usage:
#
# docker build . -t gokapi
#
# docker run -it -v gokapi-data:/app/data -v gokapi-config:/app/config -p 127.0.0.1:53842:53842 gokapi
RUN
mkdir /compile
COPY
go.mod /compile
RUN
cd /compile && go mod download
COPY
. /compile
RUN
cd /compile && go generate ./... && CGO_ENABLED=0 go build -ldflags=
"-s -w -X 'github.com/forceu/gokapi/internal/environment.IsDocker=true' -X 'github.com/forceu/gokapi/internal/environment.Builder=Project Docker File' -X 'github.com/forceu/gokapi/internal/environment.BuildTime=$(date)'"
-o /compile/gokapi github.com/forceu/gokapi/cmd/gokapi
FROM
alpine:3.19
RUN
addgroup -S gokapi && adduser -S gokapi -G gokapi
RUN
apk update && apk add --no-cache su-exec tini ca-certificates curl tzdata && \
mkdir /app && touch /app/.isdocker
COPY
dockerentry.sh /app/run.sh
COPY
--from=build_base /compile/gokapi /app/gokapi
WORKDIR
/app
ENTRYPOINT
[
"/sbin/tini"
,
"--"
]
CMD
[
"/app/run.sh"
]
HEALTHCHECK
--interval=10s --timeout=5s --retries=3 CMD curl --fail http://127.0.0.1:53842 || exit 1
Back
|
FazBrowse Home
|
New Git URL