2023-12-03 20:50:38 +01:00
|
|
|
# Start from golang base image
|
|
|
|
FROM golang:alpine
|
|
|
|
|
|
|
|
RUN apk add --no-cache make
|
2023-12-03 21:33:46 +01:00
|
|
|
RUN apk add --no-cache git
|
2023-12-04 02:46:57 +01:00
|
|
|
RUN apk add --no-cache yt-dlp
|
2023-12-03 21:33:46 +01:00
|
|
|
|
2023-12-03 20:50:38 +01:00
|
|
|
# Setup folders
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Copy the source from the current directory to the working Directory inside the container
|
|
|
|
COPY . .
|
|
|
|
COPY .env .
|
|
|
|
|
|
|
|
# Download all the dependencies
|
|
|
|
RUN go get -d -v ./...
|
|
|
|
|
|
|
|
# Build the Go app
|
|
|
|
RUN go build ./cmd/nourybot
|
|
|
|
|
|
|
|
# Run the executable
|
|
|
|
CMD [ "./nourybot", "env='prod'" ]
|