summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2025-03-09 22:13:41 -0400
committerRobby Zambito <contact@robbyzambito.me>2025-03-09 22:13:44 -0400
commit2012be4fe7f6d47f2b7218bab4ff208408b45403 (patch)
treece489614267b7c647eb1eea7931f956ace188842
parent7e18c2436bca5ae5fa8c192d4542798049cbdbc1 (diff)
Add DockerfileHEADmaster
-rw-r--r--Dockerfile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..e0b9ff4
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,12 @@
+FROM golang:1.24
+
+WORKDIR /usr/src/app
+
+# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
+COPY go.mod go.sum ./
+RUN go mod download
+
+COPY . .
+RUN go build -v -o /usr/local/bin/app ./...
+
+CMD ["app"]