summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorJulien Dessaux2024-09-20 15:51:08 +0200
committerJulien Dessaux2024-09-20 22:32:04 +0200
commit6692a6abd487e53dc39e221b6a9387fd05e1fc89 (patch)
treea1f3b640a9038bc7d1717e1ea0a1372a400f7c57 /Dockerfile
parentchore(tooling): add makefile and fixed go module path (diff)
downloadods-6692a6abd487e53dc39e221b6a9387fd05e1fc89.tar.gz
ods-6692a6abd487e53dc39e221b6a9387fd05e1fc89.tar.bz2
ods-6692a6abd487e53dc39e221b6a9387fd05e1fc89.zip
chore(tooling): add a Dockerfile along with some makefile container targets
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..0cf3598
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+##### Build ####################################################################
+FROM docker.io/library/golang:1.23-alpine
+
+WORKDIR /usr/src/app
+
+COPY go.mod go.sum ./
+RUN go mod download && go mod verify
+
+COPY . .
+RUN CGO_ENABLED=0 go build ./...
+
+##### Run ######################################################################
+FROM alpine:3.20
+
+ENV LANG en_US.utf8
+
+RUN apk upgrade --no-cache
+
+COPY --from=0 /usr/src/app/ods /usr/local/bin/
+
+ENTRYPOINT ["/usr/local/bin/ods"]