diff --git a/packages/jsreport/docker/README.md b/packages/jsreport/docker/README.md index f213b1945..dec81b601 100644 --- a/packages/jsreport/docker/README.md +++ b/packages/jsreport/docker/README.md @@ -4,9 +4,9 @@ Tags [jsreport/jsreport](https://hub.docker.com/r/jsreport/jsreport/) image is automatically pushed with adequate tags into [docker hub](https://www.docker.com/) public repository in three variations: > -- `jsreport/jsreport:4.3.0` ([Dockerfile](https://github.com/jsreport/jsreport/blob/4.3.0/packages/jsreport/docker/default/Dockerfile)) contains default installation from npm -- `jsreport/jsreport:4.3.0-full` ([Dockerfile](https://github.com/jsreport/jsreport/blob/4.3.0/packages/jsreport/docker/full/Dockerfile)) contains default installation plus all the custom extensions, see the list of installed extensions in the dockerfile -- `jsreport/jsreport:4.3.0-windowsservercore` ([Dockerfile](https://github.com/jsreport/jsreport/blob/4.3.0/packages/jsreport/docker/windowsservercore/Dockerfile)) contains default installation with windows server core based image. Use `c:\jsreport` for mounting volume. +- `jsreport/jsreport:4.3.1` ([Dockerfile](https://github.com/jsreport/jsreport/blob/4.3.1/packages/jsreport/docker/default/Dockerfile)) contains default installation from npm +- `jsreport/jsreport:4.3.1-full` ([Dockerfile](https://github.com/jsreport/jsreport/blob/4.3.1/packages/jsreport/docker/full/Dockerfile)) contains default installation plus all the custom extensions, see the list of installed extensions in the dockerfile +- `jsreport/jsreport:4.3.1-windowsservercore` ([Dockerfile](https://github.com/jsreport/jsreport/blob/4.3.1/packages/jsreport/docker/windowsservercore/Dockerfile)) contains default installation with windows server core based image. Use `c:\jsreport` for mounting volume. You can find the list of all available tags and previous versions in the [tags tab](https://hub.docker.com/r/jsreport/jsreport/tags/) @@ -14,7 +14,7 @@ Usage ----- 1. Install [Docker](https://www.docker.com/) -2. `sudo docker run -p 80:5488 jsreport/jsreport:4.3.0` +2. `sudo docker run -p 80:5488 jsreport/jsreport:4.3.1` This is the most basic usage. It will start jsreport server on port 80 directly in the current shell with data and configuration stored directly in the container. Change 80 http port to whatever you want. diff --git a/packages/jsreport/docker/default/Dockerfile b/packages/jsreport/docker/default/Dockerfile index f525ecd64..428a34e47 100644 --- a/packages/jsreport/docker/default/Dockerfile +++ b/packages/jsreport/docker/default/Dockerfile @@ -1,86 +1,6 @@ -FROM node:18.19-alpine3.19 -EXPOSE 5488 -USER root -ARG TARGETPLATFORM -ARG UID=2500 -ARG GID=2500 - -ENV GOSU_VERSION 1.12 -RUN set -eux; \ - \ - apk add --no-cache --virtual .gosu-deps \ - ca-certificates \ - dpkg \ - gnupg \ - ; \ - \ - dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ - \ - # verify the signature - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ - \ - # clean up fetch dependencies - apk del --no-network .gosu-deps; \ - \ - chmod +x /usr/local/bin/gosu; \ - # verify that the binary works - gosu --version; \ - gosu nobody true - -RUN addgroup -g "${GID}" -S jsreport && adduser --shell /bin/bash -u "${UID}" -S -G jsreport jsreport - -# this condition is useful when the alpine registry contain different latest versions -# per architecture, if the versions match then just use the same version number on both paths -RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ - export CHROMIUM_TO_INSTALL_VERSION="122.0.6261.111-r0"; \ - elif [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ - export CHROMIUM_TO_INSTALL_VERSION="122.0.6261.111-r0"; \ - fi && \ - echo "Installing Chromium $CHROMIUM_TO_INSTALL_VERSION version.." && \ - apk update --no-cache && \ - echo @edge http://dl-cdn.alpinelinux.org/alpine/v3.19/community >> /etc/apk/repositories && \ - echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \ - echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \ - apk add --no-cache \ - libstdc++@edge \ - chromium@edge=$CHROMIUM_TO_INSTALL_VERSION \ - nss \ - freetype \ - harfbuzz \ - ttf-freefont@edge \ - # just for now as we npm install from git - git \ - # so user can docker exec -it test /bin/bash - bash - -RUN rm -rf /var/cache/apk/* /tmp/* - -RUN mkdir -p /app - -# we need to create the volume and give it expected owner -# before the VOLUME step in order for the volume to be created with non-root user -RUN mkdir /jsreport -RUN chown jsreport:jsreport /jsreport -RUN chmod g+s /jsreport - -VOLUME ["/jsreport"] - -ENV NPM_CONFIG_PREFIX /home/jsreport/.npm-global -ENV PATH $PATH:/home/jsreport/.npm-global/bin - -WORKDIR /app - -ENV PUPPETEER_SKIP_DOWNLOAD true - -RUN npm i -g @jsreport/jsreport-cli -RUN jsreport init +FROM jsreport/jsreport:4.3.0 +RUN npm install jsreport@4.3.1 RUN npm cache clean -f && rm -rf /tmp/* COPY ./packages/jsreport/docker/default/editConfig.js editConfig.js @@ -88,9 +8,3 @@ COPY ./packages/jsreport/docker/default/run.sh run.sh RUN node editConfig.js RUN chown -R jsreport:jsreport /app -USER jsreport:jsreport - -ENV chrome_launchOptions_executablePath /usr/lib/chromium/chrome -ENV chrome_launchOptions_args --no-sandbox,--disable-dev-shm-usage - -CMD ["bash", "run.sh"] diff --git a/packages/jsreport/package.json b/packages/jsreport/package.json index af51553a3..d6c7b6bc4 100644 --- a/packages/jsreport/package.json +++ b/packages/jsreport/package.json @@ -1,6 +1,6 @@ { "name": "jsreport", - "version": "4.3.0", + "version": "4.3.1", "description": "javascript based business reporting", "keywords": [ "report",