# syntax=docker/dockerfile:1 FROM docker.io/golang:1.23 # Create working directory and grab deps WORKDIR /usr/src/gomusic COPY go.mod go.sum ./ RUN go mod download # Copy the source code. Note the slash at the end, as explained in # https://docs.docker.com/engine/reference/builder/#copy COPY *.go ./ # Build # Note that our dependencies require CGO RUN CGO_ENABLED=1 GOOS=linux go build -v -o /usr/local/bin/gomusic # Signal which ports we use EXPOSE 8000 # Run CMD ["gomusic"]