Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # NOTE: please keep it in sync with .github pipelines
  2. # NOTE: during testing make sure to change the branch below
  3. # NOTE: before running the build-docker GH action edit
  4. # build-docker.yml and change the release channel from :latest to :testing
  5. # Builder image
  6. FROM clojure:temurin-11-tools-deps-1.11.1.1208-bullseye-slim as builder
  7. ARG DEBIAN_FRONTEND=noninteractive
  8. # Install reqs
  9. RUN apt-get update && apt-get install -y --no-install-recommends \
  10. curl \
  11. ca-certificates \
  12. apt-transport-https \
  13. gpg \
  14. build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
  15. # install NodeJS & yarn
  16. RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
  17. RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | \
  18. tee /etc/apt/trusted.gpg.d/yarn.gpg && \
  19. echo "deb https://dl.yarnpkg.com/debian/ stable main" | \
  20. tee /etc/apt/sources.list.d/yarn.list && \
  21. apt-get update && apt-get install -y nodejs yarn
  22. WORKDIR /data
  23. # build Logseq static resources
  24. RUN git clone -b master https://github.com/logseq/logseq.git .
  25. RUN yarn config set network-timeout 240000 -g && yarn install
  26. RUN yarn release
  27. # Web App Runner image
  28. FROM nginx:1.24.0-alpine3.17
  29. COPY --from=builder /data/static /usr/share/nginx/html