aboutsummaryrefslogtreecommitdiffhomepage
path: root/Dockerfile
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-04-30 09:39:00 +0900
committernsfisis <nsfisis@gmail.com>2024-04-30 09:39:00 +0900
commit126c45c72e98963e4e73852a6d4945ec4359620b (patch)
tree3a0f2d007b022b9750082a19e950f8e9670e18dc /Dockerfile
parent04df54443363ec2911e737e11110c18f350b66e1 (diff)
downloadfeedaka-126c45c72e98963e4e73852a6d4945ec4359620b.tar.gz
feedaka-126c45c72e98963e4e73852a6d4945ec4359620b.tar.zst
feedaka-126c45c72e98963e4e73852a6d4945ec4359620b.zip
Add files
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..01858f7
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+FROM golang:1.20-alpine as builder
+
+WORKDIR /app
+
+RUN apk update && apk add --no-cache build-base sqlite
+COPY go.mod go.sum ./
+RUN go mod download
+
+COPY . ./
+RUN CGO_ENABLED=1 GOOS=linux go build -o feedaka main.go
+
+FROM alpine
+
+WORKDIR /app
+COPY --from=builder /app/feedaka /app
+
+EXPOSE 8080
+CMD ["/app/feedaka"]