1
0

first commit

This commit is contained in:
alphard 2023-10-22 01:06:03 -03:00
commit e223f9077a
2 changed files with 32 additions and 0 deletions

31
Dockerfile Normal file
View File

@ -0,0 +1,31 @@
FROM golang:alpine as gobuilder
MAINTAINER alphard <alphard@aehoo.net>
RUN wget -O algernon.tar.gz https://github.com/xyproto/algernon/archive/refs/tags/v1.15.4.tar.gz &&\
mkdir -p /algernon &&\
tar --strip-components=1 -C /algernon -xvf algernon.tar.gz
WORKDIR /algernon
# Build Algernon
RUN GOOS=linux \
GOARCH=amd64 \
CGO_ENABLED=0 \
go build \
-mod=vendor \
-a \
-trimpath \
-installsuffix cgo \
-ldflags="-w -s" \
-o /bin/algernon
RUN apk add upx && upx /bin/algernon
FROM scratch
COPY --from=gobuilder /bin/algernon /bin/algernon
COPY --from=gobuilder /tmp /tmp
VOLUME /srv/algernon
WORKDIR /srv/algernon
EXPOSE 80
ENTRYPOINT ["/bin/algernon", "--domain", "--server", "--nocache", "--prod", "/srv/algernon"]

1
README.md Normal file
View File

@ -0,0 +1 @@
Gera uma imagem de algernon para AehooNET