Initial commit
This commit is contained in:
commit
eca46fcadd
21 changed files with 1666 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal 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" ]
|
Loading…
Add table
Add a link
Reference in a new issue