view 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 source

# 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"]