mirror of
https://github.com/davegallant/rfd-fyi.git
synced 2025-08-06 07:13:39 +00:00
Add Dockerfile
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:1.18-alpine
|
||||
|
||||
# hadolint ignore=DL3018
|
||||
RUN apk --no-cache add \
|
||||
gcc \
|
||||
musl-dev
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY backend/ .
|
||||
|
||||
RUN CGO_ENABLED=1 GOOS=linux \
|
||||
go build -o /rfd-fyi \
|
||||
# Additional flags are necessary for sqlite support
|
||||
-a -ldflags '-linkmode external -extldflags "-static"' .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD [ "/rfd-fyi" ]
|
Reference in New Issue
Block a user