-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 827 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (25 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM golang:1.25-alpine AS builder
ARG http_proxy
ARG https_proxy
ARG no_proxy
RUN apk add --no-cache ca-certificates tzdata && \
adduser -D -u 1001 appuser
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags="-s -w" -o /bin/bot ./cmd/bot
FROM alpine:3.19
LABEL org.opencontainers.image.source="https://github.com/sunba91-su/Roket.Chat-GeekBot"
LABEL org.opencontainers.image.description="Rocket.Chat daily standup bot"
LABEL org.opencontainers.image.licenses="MIT"
RUN apk add --no-cache ca-certificates tzdata && \
adduser -D -u 1001 appuser
COPY --from=builder /bin/bot /bot
RUN mkdir -p /data && chown -R appuser:appuser /data
USER appuser
WORKDIR /home/appuser
VOLUME /data
ENV STANDUP_DB_PATH=/data/standup-bot.db
CMD ["/bot"]