Initial commit

This commit is contained in:
Manuel 2023-08-29 18:00:00 +02:00
commit eca46fcadd
Signed by: Manuel
GPG key ID: 4085037435E1F07A
21 changed files with 1666 additions and 0 deletions

20
Dockerfile Normal file
View file

@ -0,0 +1,20 @@
FROM golang:1.21 AS build
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates
WORKDIR /tmp/app
COPY . .
RUN go mod download && \
CGO_ENABLED=1 go build -a -buildmode=pie -trimpath -ldflags "-s -w -linkmode 'external' -extldflags '-static-pie' -X main.prefix=" -o discord-tweeter
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
WORKDIR /app
COPY --from=build /tmp/app/discord-tweeter .
#COPY ./config.example.toml ./config.toml
ENTRYPOINT [ "./discord-tweeter" ]
# CMD [ "./config.toml" ]