This repository has been archived on 2024-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
helseveileder/backend/Dockerfile
haraldnilsen bf9334ed1f new endpoint
2024-01-12 22:23:33 +01:00

22 lines
504 B
Docker

# syntax=docker/dockerfile:1
# Start from the latest golang base image
FROM golang:latest
# Set the Current Working Directory inside the container
WORKDIR /app
# Copy everything from the current directory to the PWD inside the container
COPY . .
# Download all the dependencies
RUN go mod download
# Build the Go app - change directory to 'cmd' where main.go resides
RUN go build -o main ./cmd
# Expose port 8080 to the outside world
EXPOSE 8080
# Command to run the executable
CMD ["./cmd/main"]