2024-01-09 05:09:01 +01:00
|
|
|
# Start from golang base image
|
|
|
|
FROM golang:alpine3.19
|
|
|
|
|
|
|
|
RUN apk add --no-cache git ca-certificates build-base su-exec olm-dev sqlite
|
|
|
|
|
|
|
|
# Setup folders
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Copy the source from the current directory to the working Directory inside the container
|
|
|
|
COPY . .
|
2024-01-11 00:19:55 +01:00
|
|
|
#COPY .env .
|
|
|
|
COPY ./db/nourybot.db .
|
2024-01-09 05:09:01 +01:00
|
|
|
|
|
|
|
# Download all the dependencies
|
|
|
|
RUN go get -d -v ./...
|
2024-01-11 00:19:55 +01:00
|
|
|
Run go build -o "Nourybot.out" ./cmd/bot
|
2024-01-09 05:09:01 +01:00
|
|
|
|
|
|
|
# Run the executable
|
2024-02-04 12:17:32 +01:00
|
|
|
CMD [ "./Nourybot.out" ]
|
2024-01-09 05:09:01 +01:00
|
|
|
|