add docker

This commit is contained in:
shoopea
2021-11-07 00:13:45 +08:00
parent 1fba5c61cc
commit eaa1a7fed2
7 changed files with 54 additions and 14 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM golang:alpine as builder
RUN apk add --no-cache \
git
WORKDIR /app
ARG COMMIT=latest
RUN GOBIN=/app go install git.siteop.biz/shoopea/gottdad@$COMMIT
FROM alpine:latest
RUN apk add --no-cache \
libstdc++
WORKDIR /app/
# Copy the Pre-built binary file from the previous stage
COPY --from=builder /app/gotdadd .
# Command to run the executable
CMD ["./gotdadd"]