Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Update electron version to 4.2.12 #223

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CLI_DIR ?= cli
CLI_IMAGE ?= "arachnysdocker/athenapdf"
CLI_DOCKER_ARTIFACT_DIR ?= "/athenapdf/build/"
TESTS_DIR ?= `pwd`/test

SERVICE_DIR ?= weaver
SERVICE_IMAGE ?= "arachnysdocker/athenapdf-service"
Expand Down Expand Up @@ -32,6 +33,12 @@ testcli:
@docker run --rm arachnysdocker/athenapdf athenapdf -S https://status.github.com/ | grep -a "PDF-1.4"
@echo "<h1>stdin test</h1>" | docker run --rm -i arachnysdocker/athenapdf athenapdf -S - | grep -a "PDF-1.4"

testnewversion:
@echo " $(P) Test upgrades"
@docker run --rm -v $(TESTS_DIR)/files:/converted arachnysdocker/athenapdf athenapdf template.html new.pdf
@cd $(TESTS_DIR) && docker build . -t arachnysdocker/athenapdf-tests
@docker run -it --rm -v $(TESTS_DIR)/files:/athenapdf-tests/files arachnysdocker/athenapdf-tests npm run test || (echo "Command exited with status code $$?"; exit 0)

buildservice:
@echo " $(P) buildservice"
@rm -rf $(SERVICE_DIR)/build/
Expand Down
28 changes: 21 additions & 7 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
FROM debian:8.7
MAINTAINER Arachnys <[email protected]>
FROM debian:11.4-slim

ARG USERNAME=athenapdf
ARG USER_UID=1000
ARG USER_GID=$USER_UID

RUN echo 'deb http://httpredir.debian.org/debian/ stable main contrib non-free' >> /etc/apt/sources.list

RUN apt-get -yq update && \
apt-get -yq install \
RUN apt update -yq && \
apt install -yq \
sudo \
wget \
xvfb \
libasound2 \
Expand All @@ -13,7 +17,8 @@ RUN apt-get -yq update && \
libnotify4 \
libnss3 \
libxss1 \
libXtst6 \
libxtst6 \
libgbm-dev \
culmus \
fonts-beng \
fonts-dejavu \
Expand All @@ -29,8 +34,8 @@ RUN apt-get -yq update && \
fonts-sil-padauk \
fonts-telu \
fonts-thai-tlwg \
ttf-liberation \
ttf-unfonts-core \
fonts-liberation \
fonts-unfonts-core \
ttf-wqy-zenhei \
&& apt-get -yq autoremove \
&& apt-get -yq clean \
Expand All @@ -47,8 +52,17 @@ ENV PATH /athenapdf/:$PATH
COPY entrypoint.sh /athenapdf/entrypoint.sh

RUN mkdir -p /converted/
RUN mkdir /run/dbus
WORKDIR /converted/

# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

USER $USERNAME

CMD ["athenapdf"]

ENTRYPOINT ["/athenapdf/entrypoint.sh"]
2 changes: 1 addition & 1 deletion cli/Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mhart/alpine-node:6
FROM mhart/alpine-node:14
MAINTAINER Arachnys <[email protected]>

RUN mkdir -p /athenapdf/build/artifacts/
Expand Down
2 changes: 2 additions & 0 deletions cli/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ set -e
rm -f /tmp/.X99-lock
Xvfb :99 -ac -screen 0 1024x768x24 > /dev/null 2>&1 &
export DISPLAY=:99
export ELECTRON_DISABLE_SANDBOX=true
export DBUS_SESSION_BUS_ADDRESS=`sudo dbus-daemon --fork --config-file=/usr/share/dbus-1/system.conf --print-address`

exec "$@"
Loading