diff backend/dockerfile @ 0:a17a4894f4bd draft default tip

Initial commit converting git to mercurial
author Alfred Burgess <aburgess@ucc.asn.au>
date Sun, 14 Apr 2024 19:35:23 +0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backend/dockerfile	Sun Apr 14 19:35:23 2024 +0800
@@ -0,0 +1,20 @@
+# Use an official Go runtime as a parent image
+FROM golang:latest
+
+# Set the working directory inside the container
+WORKDIR /app
+
+# Copy the local package files to the container's workspace
+COPY . .
+
+# Build the Go application
+RUN go build main.go
+
+# Build
+#RUN CGO_ENABLED=0 GOOS=linux go build -o /webapp
+
+# Expose port 8080 to the outside world
+EXPOSE 8080
+
+# Command to run the executable
+CMD ["./main"]