From fc25c73fe625ff1108182c15ff060368046b5715 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 16 Nov 2022 13:47:03 +0100 Subject: [PATCH] refs #4550 Deployment: Cups password parametized --- Dockerfile | 2 -- Jenkinsfile | 1 + docker-compose.yml | 2 ++ entrypoint.sh | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e4c9566..a88e6c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,8 +36,6 @@ COPY GoDEXdriver-1.1.6.tar.gz /tmp/ RUN (cd /tmp && tar -xf /tmp/GoDEXdriver-1.1.6.tar.gz) \ && chmod a+x /tmp/GoDEXdriver-1.1.6/install-driver \ && (cd /tmp/GoDEXdriver-1.1.6 && ./install-driver) - -RUN echo 'root:1234' | chpasswd ENTRYPOINT ["/printnatura/entrypoint.sh"] CMD ["node", "main.js"] \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index fb4ae85..cf1b76f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,6 +21,7 @@ pipeline { } environment { CREDS = credentials('docker-registry') + CUPS = credentials('printnatura') } steps { sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY' diff --git a/docker-compose.yml b/docker-compose.yml index b27269c..fe6df3e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: context: . dockerfile: Dockerfile + environment: + CUPS_PASSWORD: ${CUPS_PSW} ports: - 631 configs: diff --git a/entrypoint.sh b/entrypoint.sh index 31265cc..a0d3858 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,8 +1,9 @@ #!/bin/bash +echo "root:$CUPS_PASSWORD" | chpasswd cupsd #Printers lpadmin -p labeler48 -E -v socket://10.1.11.48 -m GoDEX/godex-zx420i.ppd -exec $@ \ No newline at end of file +exec $@