Skip to content

Commit

Permalink
Fix HTML snapshot errors related to single-file-cli (#683)
Browse files Browse the repository at this point in the history
* Install node 20 on debian image

* use singlefile fork
  • Loading branch information
sissbruecker committed Apr 7, 2024
1 parent bb6c5ca commit 68c163d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ CMD ["./bootstrap.sh"]


FROM linkding AS linkding-plus
# install node, chromium and single-file
RUN apk update && apk add nodejs npm chromium && npm install -g single-file-cli
# install node, chromium
RUN apk update && apk add nodejs npm chromium
# install single-file from fork for now, which contains several hotfixes
RUN npm install -g https://github.com/sissbruecker/single-file-cli/tarball/f3730995a52f27d5041a1ad9e7528af4b6b4cf4b
# enable snapshot support
ENV LD_ENABLE_SNAPSHOTS=True
12 changes: 10 additions & 2 deletions docker/default.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,15 @@ CMD curl -f http://localhost:${LD_SERVER_PORT:-9090}/${LD_CONTEXT_PATH}health ||
CMD ["./bootstrap.sh"]

FROM linkding AS linkding-plus
# install node, chromium and single-file
RUN apt-get update && apt-get -y install nodejs npm chromium && npm install -g single-file-cli
# install chromium
RUN apt-get update && apt-get -y install chromium
# install node
ENV NODE_MAJOR=20
RUN apt-get install -y gnupg2 apt-transport-https ca-certificates && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg && \
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && apt-get install -y nodejs
# install single-file from fork for now, which contains several hotfixes
RUN npm install -g https://github.com/sissbruecker/single-file-cli/tarball/f3730995a52f27d5041a1ad9e7528af4b6b4cf4b
# enable snapshot support
ENV LD_ENABLE_SNAPSHOTS=True

0 comments on commit 68c163d

Please sign in to comment.