Dockerfile 620 B

123456789101112131415161718192021
  1. # Specifies a parent image
  2. FROM golang:alpine
  3. # Creates an app directory to hold your app’s source code
  4. WORKDIR /app
  5. # Copies everything from your root directory into /app
  6. COPY . .
  7. COPY config/settings.env config/settings.env
  8. # Installs Go dependencies
  9. RUN go mod download
  10. # Builds your app with optional configuration
  11. RUN go build -o retro_aim_server ./cmd/server
  12. # Tells Docker which network port your container listens on
  13. EXPOSE 8080 5190 5191 5192 5193 5194 5195 5196 5197
  14. # Specifies the executable command that runs when the container starts
  15. CMD ["/app/retro_aim_server", "-config", "config/settings.env"]