infra/nix/pkgs/logseq/Containerfile

58 lines
1.9 KiB
Text
Raw Normal View History

# NOTE: please keep it in sync with .github pipelines
# NOTE: during testing make sure to change the branch below
# NOTE: before running the build-docker GH action edit
# build-docker.yml and change the release channel from :latest to :testing
# Builder image
2024-10-13 20:06:36 +02:00
# FROM clojure:temurin-11-tools-deps-1.11.1.1208-bullseye-slim as builder
FROM clojure:temurin-11-tools-deps-bullseye-slim as builder
ARG DEBIAN_FRONTEND=noninteractive
# Install reqs
RUN echo 1
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
apt-transport-https \
gpg \
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev \
zip
# install NodeJS & yarn
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
2024-10-13 20:06:36 +02:00
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/yarn.gpg && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y nodejs yarn
WORKDIR /data
2024-10-13 20:06:36 +02:00
ENV VERSION=0.10.9
# build Logseq static resources
RUN git clone -b ${VERSION} https://github.com/logseq/logseq.git .
RUN yarn config set network-timeout 240000 -g && yarn install
RUN yarn release-electron
RUN mkdir /out
RUN mv /data/static/out/make/zip /out/${VERSION}.zip
RUN mv /data/static/out/make/*.AppImage /out/
FROM scratch as artifacts
COPY --from=builder /out /
# Logseq-${VERSION}.AppImage
# RUN mv zip /${VERSION}.zip
# RUN \
# mkdir -p builds
# # NOTE: save VERSION file to builds directory
# cp static/VERSION ./builds/VERSION
# mv static/out/make/*-*.AppImage ./builds/Logseq-linux-aarch64-${VERSION}.AppImage
# mv static/out/make/zip/linux/x64/*-linux-x64-*.zip ./builds/Logseq-linux-aarch64-${VERSION}.zip
# # Web App Runner image
# FROM nginx:1.24.0-alpine3.17
#
# COPY --from=builder /data/static /usr/share/nginx/html
#