pengx17 / logseq-publish

Archived. Please check https://github.com/logseq/publish-spa instead

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run locally using provided Dockerfiles?

gwpl opened this issue · comments

I am a bit stupid about how to run this github actions dockers locally. Could you help me?

For both Dockerfiles I am getting errors when I try to build them:

First I start:

git clone https://github.com/pengx17/logseq-publish.git
cd logseq-publish

then for provided Dockerfile following error:

docker build . 
Sending build context to Docker daemon  634.9kB
Step 1/12 : ARG LOGSEQ_TAG
Step 2/12 : FROM ghcr.io/pengx17/logseq-base:${LOGSEQ_TAG} as logseq
invalid reference format

and for Dockerfile.logseq following error:

docker build - < Dockerfile.logseq 
Sending build context to Docker daemon  3.072kB
Step 1/16 : FROM clojure:openjdk-18-tools-deps-buster as builder
 ---> f2e13d1fee88
Step 2/16 : ARG LOGSEQ_TAG=master
 ---> Using cache
 ---> f341dece3539
Step 3/16 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 67863efe20b6
Step 4/16 : RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - &&   apt-get install -y nodejs
 ---> Using cache
 ---> a00280fd8470
Step 5/16 : RUN apt-get update && apt-get install ca-certificates &&   wget --no-check-certificate -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - &&   echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list &&   apt-get update &&   apt-get install -y yarn
 ---> Using cache
 ---> d8ed3665d4d2
Step 6/16 : WORKDIR /data/
 ---> Using cache
 ---> a933831781a8
Step 7/16 : RUN git clone --depth 1 --branch $LOGSEQ_TAG --single-branch https://github.com/logseq/logseq.git
 ---> Using cache
 ---> a3e1611acfa6
Step 8/16 : RUN cd /data/logseq && git rev-parse HEAD && yarn && yarn release && mv ./static ./public
 ---> Using cache
 ---> 32ee9bf4a33a
Step 9/16 : FROM mcr.microsoft.com/playwright:focal
 ---> 7c58e29f83e1
Step 10/16 : RUN apt-get update && apt-get install -y build-essential
 ---> Using cache
 ---> 1b39f2eb175d
Step 11/16 : RUN npm install -g pnpm --force
 ---> Using cache
 ---> cffabec1423a
Step 12/16 : WORKDIR /home/logseq
 ---> Using cache
 ---> d48180c27d07
Step 13/16 : COPY --from=builder /data/logseq/public ./public
 ---> Using cache
 ---> 7e47b11ef8fe
Step 14/16 : COPY package.json pnpm-lock.yaml ./
COPY failed: file not found in build context or excluded by .dockerignore: stat package.json: file does not exist

You do not need to clone the project to use the docker image. Here in the README section an example of running the docker locally

PS C:\> docker run -d -i  `
	     --name LogSeqPublishContainer  `
	     --rm `
	     -v D:\WorfklowScripts\PublishLogseqExport\graph:/home/logseq/graph  `
	     -w /home/logseq  `
	     ghcr.io/pengx17/logseq-base:master  `
	     bash -c "xvfb-run node /home/logseq/graph/publish.mjs -p /home/logseq/graph/KnowledgeGraph -t /home/logseq/graph/build_trace.txt -o /home/logseq/graph/HTMLOutput > /home/logseq/graph/build.log"