summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2025-03-09 23:49:59 -0400
committerRobby Zambito <contact@robbyzambito.me>2025-03-09 23:50:37 -0400
commitbcd56644b9905d3b8d9eac79eb923ffc185c82aa (patch)
tree2ecf54ba65d00755dadbe25c16eb2e6c1816c360
parente9c425b258e5f7894bdef8b19f40357fbbd9eaff (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"]