A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

43 行
1.2 KiB

  1. # Build image
  2. FROM golang:1.19-alpine as build
  3. LABEL org.opencontainers.image.source=https://github.com/writefreely/writefreely
  4. LABEL org.opencontainers.image.description="WriteFreely is a clean, minimalist publishing platform made for writers. Start a blog, share knowledge within your organization, or build a community around the shared act of writing."
  5. RUN apk add --update nodejs npm make g++ git
  6. RUN npm install -g less less-plugin-clean-css
  7. RUN mkdir -p /go/src/github.com/writefreely/writefreely
  8. WORKDIR /go/src/github.com/writefreely/writefreely
  9. COPY . .
  10. RUN cat ossl_legacy.cnf > /etc/ssl/openssl.cnf
  11. ENV GO111MODULE=on
  12. ENV NODE_OPTIONS=--openssl-legacy-provider
  13. RUN make build \
  14. && make ui
  15. RUN mkdir /stage && \
  16. cp -R /go/bin \
  17. /go/src/github.com/writefreely/writefreely/templates \
  18. /go/src/github.com/writefreely/writefreely/static \
  19. /go/src/github.com/writefreely/writefreely/pages \
  20. /go/src/github.com/writefreely/writefreely/keys \
  21. /go/src/github.com/writefreely/writefreely/cmd \
  22. /stage
  23. # Final image
  24. FROM alpine:3
  25. RUN apk add --no-cache openssl ca-certificates
  26. COPY --from=build --chown=daemon:daemon /stage /go
  27. WORKDIR /go
  28. VOLUME /go/keys
  29. EXPOSE 8080
  30. USER daemon
  31. ENTRYPOINT ["cmd/writefreely/writefreely"]