about summary refs log tree commit diff stats
path: root/Dockerfile
diff options
context:
space:
mode:
authorAlan Pearce2024-04-19 16:11:33 +0200
committerAlan Pearce2024-04-19 22:13:42 +0200
commit30e4cb4e4af3a6eebd3b4fb431828d284a72a10a (patch)
treeca5ae02e140f9d1b35a9824da04a71e32a981a47 /Dockerfile
parent0fc79f324d54cc7a45c0ad0ffa9c75cd716e0126 (diff)
downloadwebsite-30e4cb4e4af3a6eebd3b4fb431828d284a72a10a.tar.lz
website-30e4cb4e4af3a6eebd3b4fb431828d284a72a10a.tar.zst
website-30e4cb4e4af3a6eebd3b4fb431828d284a72a10a.zip
use nix to build docker images
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile34
1 files changed, 0 insertions, 34 deletions
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index bf8da92..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,34 +0,0 @@
-# syntax = docker/dockerfile:1
-
-ARG GO_VERSION=1.22.1
-FROM docker.io/library/golang:${GO_VERSION} as builder
-
-WORKDIR /app
-
-COPY --link go.mod .
-RUN go mod download
-
-COPY --link . .
-
-# RUN go vet ./...
-ENV ENV=production
-RUN go run ./cmd/build
-
-ENV GOOS=linux GOARCH=amd64 CGO_ENABLED=0
-RUN go build server.go
-
-# Final stage for app image
-FROM gcr.io/distroless/static
-
-WORKDIR /app
-
-# Copy built application
-COPY --link config.toml .
-COPY --from=builder /app/server server
-
-# Start the server by default, this can be overwritten at runtime
-EXPOSE 3000
-EXPOSE 9091
-
-ENV ENV=production
-CMD [ "/app/server" ]