|
|
@ -1,13 +1,3 @@
|
|
|
|
FROM golang:alpine AS caddy
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/mholt/caddy
|
|
|
|
|
|
|
|
RUN echo https://alpine.global.ssl.fastly.net/alpine/v3.8/main > /etc/apk/repositories && \
|
|
|
|
|
|
|
|
apk add --progress --update git gcc musl-dev ca-certificates
|
|
|
|
|
|
|
|
RUN git clone --branch v0.11.0 --single-branch --depth 1 https://github.com/mholt/caddy /go/src/github.com/mholt/caddy &> /dev/null && \
|
|
|
|
|
|
|
|
sed -i 's/var EnableTelemetry = true/var EnableTelemetry = false/' /go/src/github.com/mholt/caddy/caddy/caddymain/run.go && \
|
|
|
|
|
|
|
|
sed -i 's/const enableTelemetry = true/const enableTelemetry = false/' /go/src/github.com/mholt/caddy/caddy/caddymain/run.go
|
|
|
|
|
|
|
|
RUN git clone https://github.com/caddyserver/builds /go/src/github.com/caddyserver/builds
|
|
|
|
|
|
|
|
RUN cd caddy && go run build.go -goos=linux -goarch=amd64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FROM alpine:3.8 AS stackedit
|
|
|
|
FROM alpine:3.8 AS stackedit
|
|
|
|
RUN echo https://alpine.global.ssl.fastly.net/alpine/v3.8/main > /etc/apk/repositories && \
|
|
|
|
RUN echo https://alpine.global.ssl.fastly.net/alpine/v3.8/main > /etc/apk/repositories && \
|
|
|
|
apk add -q --progress --update --no-cache git npm
|
|
|
|
apk add -q --progress --update --no-cache git npm
|
|
|
@ -16,16 +6,13 @@ WORKDIR /stackedit
|
|
|
|
RUN npm install
|
|
|
|
RUN npm install
|
|
|
|
RUN npm run build
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
|
|
|
|
FROM alpine:3.8
|
|
|
|
FROM nginx:1.15-alpine
|
|
|
|
LABEL maintainer="quentin.mcgaw@gmail.com" \
|
|
|
|
LABEL maintainer="quentin.mcgaw@gmail.com" \
|
|
|
|
description="StackEdit server in a lightweight Docker container" \
|
|
|
|
description="StackEdit server in a lightweight Docker container" \
|
|
|
|
download="???MB" \
|
|
|
|
download="???MB" \
|
|
|
|
size="51.2MB" \
|
|
|
|
size="45.5MB" \
|
|
|
|
ram="2MB-3MB" \
|
|
|
|
ram="7MB" \
|
|
|
|
cpu_usage="Very low" \
|
|
|
|
cpu_usage="Very low" \
|
|
|
|
github="https://github.com/qdm12/stackedit-docker"
|
|
|
|
github="https://github.com/qdm12/stackedit-docker"
|
|
|
|
EXPOSE 80
|
|
|
|
COPY --from=stackedit /stackedit/dist /usr/share/nginx/html/
|
|
|
|
COPY --from=stackedit /stackedit/dist /stackedit
|
|
|
|
ENTRYPOINT nginx -g "daemon off;"
|
|
|
|
COPY --from=caddy /go/src/github.com/mholt/caddy/caddy/caddy /usr/bin/caddy
|
|
|
|
|
|
|
|
COPY Caddyfile /Caddyfile
|
|
|
|
|
|
|
|
ENTRYPOINT caddy -conf /Caddyfile -log stdout
|
|
|
|
|
|
|
|