diff --git a/Dockerfile b/Dockerfile index 32ef4c3b..aa960764 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Builder image. Alpine doesn't have python which is required by node-sass -FROM node:buster AS builder +FROM node:14-buster AS builder ENV APP_DIR=/app WORKDIR "$APP_DIR" @@ -20,7 +20,7 @@ RUN cd webui \ && npm run server-build # production image -FROM node:buster-slim +FROM node:14-buster-slim ENV APP_DIR=/app WORKDIR "$APP_DIR" RUN apt-get update \ diff --git a/docs/development.md b/docs/development.md index e4e05dd3..e029e0a5 100644 --- a/docs/development.md +++ b/docs/development.md @@ -54,7 +54,7 @@ sudo chmod 666 /var/run/docker.sock ``` Useful commands -```console +```sh # Build and run docker build -t scanservjs-image . docker rm --force scanservjs-container 2> /dev/null @@ -82,11 +82,15 @@ docker container restart scanservjs-container # Maintenance docker ps -a docker image prune +docker image rm -f $(docker image ls --filter dangling=true -q) + +# Danger +docker image rm -f $(docker image ls -a -q) ``` ## Mount map configuration files -``` +```sh docker run -d \ -p 8080:8080 \ -v `pwd`/var/:/app/config/ \ diff --git a/server/package-lock.json b/server/package-lock.json index 6f378440..d8195084 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,6 +1,6 @@ { "name": "scanservjs-server", - "version": "2.11.1", + "version": "2.11.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/server/package.json b/server/package.json index 754c8896..88841e92 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "scanservjs-server", - "version": "2.11.1", + "version": "2.11.2", "description": "scanservjs is a simple web-based UI for SANE which allows you to share a scanner on a network without the need for drivers or complicated installation. scanserv does not do image conversion or manipulation (beyond the bare minimum necessary for the purposes of browser preview) or OCR.", "scripts": { "serve": "nodemon --exec 'vue-cli-service serve'", diff --git a/server/src/api.js b/server/src/api.js index ef69e156..d47a2025 100644 --- a/server/src/api.js +++ b/server/src/api.js @@ -85,7 +85,7 @@ class Api { if (source.exists()) { const buffer = source.toBuffer(); const cmds = [...Config.previewPipeline.commands]; - if (filters) { + if (filters && filters.length) { const params = Filters.build(filters, true); cmds.splice(0, 0, `convert - ${params} tif:-`); }