first commit
This commit is contained in:
commit
e223f9077a
31
Dockerfile
Normal file
31
Dockerfile
Normal 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"]
|
Loading…
Reference in New Issue
Block a user