aboutsummaryrefslogtreecommitdiffhomepage
path: root/Dockerfile
diff options
context:
space:
mode:
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"]