From a1661e70b22243b2e441a875a38155685ff07a17 Mon Sep 17 00:00:00 2001 From: Maxim Voronko Date: Fri, 9 Feb 2024 16:42:45 +0200 Subject: [PATCH 1/3] Add access key ENV --- Dockerfile | 3 +++ Dockerfile.centos | 3 +++ Dockerfile.redhat | 3 +++ Dockerfile.ubuntu-prebuilt | 3 +++ files/configureFiles.pl | 6 ++++++ 5 files changed, 18 insertions(+) diff --git a/Dockerfile b/Dockerfile index d7a214d..7d760c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,6 +94,9 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false +# Access Key +ENV ACCESS_KEY='' + RUN apt-get update && \ apt-get upgrade -y perl && \ apt-get install -y --no-install-recommends nginx default-jre wget && \ diff --git a/Dockerfile.centos b/Dockerfile.centos index ee7fd32..3e876cb 100755 --- a/Dockerfile.centos +++ b/Dockerfile.centos @@ -92,6 +92,9 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false +# Access Key +ENV ACCESS_KEY='' + RUN yum update -y --skip-broken && \ yum install -y epel-release && \ yum install -y nginx \ diff --git a/Dockerfile.redhat b/Dockerfile.redhat index 76f7bc3..aaef0e5 100644 --- a/Dockerfile.redhat +++ b/Dockerfile.redhat @@ -92,6 +92,9 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false +# Access Key +ENV ACCESS_KEY='' + RUN yum update -y --skip-broken && \ yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ yum install -y nginx \ diff --git a/Dockerfile.ubuntu-prebuilt b/Dockerfile.ubuntu-prebuilt index 22e4b0c..206df1a 100644 --- a/Dockerfile.ubuntu-prebuilt +++ b/Dockerfile.ubuntu-prebuilt @@ -60,6 +60,9 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false +# Access Key +ENV ACCESS_KEY='' + RUN apt-get update && apt-get install -y --no-install-recommends wget RUN if [ -z $(egrep -i "^${USER_NAME}" /etc/group) ]; then \ diff --git a/files/configureFiles.pl b/files/configureFiles.pl index 590160f..00f6af3 100644 --- a/files/configureFiles.pl +++ b/files/configureFiles.pl @@ -10,6 +10,7 @@ configureAppServerParams(); configureDatabase(); configureProxyParams(); +configureAccessKey(); sub configureSamplesAndVirtualDir { @@ -142,6 +143,11 @@ sub configureProxyParams replaceXmlValues(\%tags, $server_config_path); } +sub configureAccessKey() +{ + replaceXmlValues({ 'AccessKey' => $ENV{'ACCESS_KEY'} }, $server_config_path); +} + sub replaceFileContent { my ($pairs, $path) = @_; From 6e1f2d99ad1798bffb70ae8bf11838b977f46f3e Mon Sep 17 00:00:00 2001 From: Maxim Voronko Date: Fri, 9 Feb 2024 16:45:38 +0200 Subject: [PATCH 2/3] Change description --- Dockerfile | 2 +- Dockerfile.centos | 2 +- Dockerfile.redhat | 2 +- Dockerfile.ubuntu-prebuilt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d760c5..fa59560 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,7 +94,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key +# Access Key for Custom Dictionary and Style Guide API ENV ACCESS_KEY='' RUN apt-get update && \ diff --git a/Dockerfile.centos b/Dockerfile.centos index 3e876cb..0240cdf 100755 --- a/Dockerfile.centos +++ b/Dockerfile.centos @@ -92,7 +92,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key +# Access Key for Custom Dictionary and Style Guide API ENV ACCESS_KEY='' RUN yum update -y --skip-broken && \ diff --git a/Dockerfile.redhat b/Dockerfile.redhat index aaef0e5..7e8248b 100644 --- a/Dockerfile.redhat +++ b/Dockerfile.redhat @@ -92,7 +92,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key +# Access Key for Custom Dictionary and Style Guide API ENV ACCESS_KEY='' RUN yum update -y --skip-broken && \ diff --git a/Dockerfile.ubuntu-prebuilt b/Dockerfile.ubuntu-prebuilt index 206df1a..d80b124 100644 --- a/Dockerfile.ubuntu-prebuilt +++ b/Dockerfile.ubuntu-prebuilt @@ -60,7 +60,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key +# Access Key for Custom Dictionary and Style Guide API ENV ACCESS_KEY='' RUN apt-get update && apt-get install -y --no-install-recommends wget From f9d54baf23e695a188cc9296b3f0ae6a42cfc0e1 Mon Sep 17 00:00:00 2001 From: Maxim Voronko Date: Fri, 9 Feb 2024 18:27:41 +0200 Subject: [PATCH 3/3] Add ACCESS_KEY as ARG to use it also during image building --- Dockerfile | 6 ++++-- Dockerfile.centos | 6 ++++-- Dockerfile.redhat | 6 ++++-- Dockerfile.ubuntu-prebuilt | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa59560..e41cc54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,9 @@ ARG PROXY_PORT ARG PROXY_USER_NAME ARG PROXY_PASSWORD +# Access Key for Custom Dictionary and Style Guide API +ARG ACCESS_KEY + ENV FILE_OWNER=${USER_ID}:${GROUP_ID} ENV PRODUCTS=${PRODUCTS} ENV LANGUAGES=${LANGUAGES} @@ -94,8 +97,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key for Custom Dictionary and Style Guide API -ENV ACCESS_KEY='' +ENV ACCESS_KEY=${ACCESS_KEY} RUN apt-get update && \ apt-get upgrade -y perl && \ diff --git a/Dockerfile.centos b/Dockerfile.centos index 0240cdf..96cf845 100755 --- a/Dockerfile.centos +++ b/Dockerfile.centos @@ -54,6 +54,9 @@ ARG PROXY_PORT ARG PROXY_USER_NAME ARG PROXY_PASSWORD +# Access Key for Custom Dictionary and Style Guide API +ARG ACCESS_KEY + ENV FILE_OWNER=${USER_ID}:${GROUP_ID} ENV PRODUCTS=${PRODUCTS} ENV LANGUAGES=${LANGUAGES} @@ -92,8 +95,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key for Custom Dictionary and Style Guide API -ENV ACCESS_KEY='' +ENV ACCESS_KEY=${ACCESS_KEY} RUN yum update -y --skip-broken && \ yum install -y epel-release && \ diff --git a/Dockerfile.redhat b/Dockerfile.redhat index 7e8248b..7a43338 100644 --- a/Dockerfile.redhat +++ b/Dockerfile.redhat @@ -54,6 +54,9 @@ ARG PROXY_PORT ARG PROXY_USER_NAME ARG PROXY_PASSWORD +# Access Key for Custom Dictionary and Style Guide API +ARG ACCESS_KEY + ENV FILE_OWNER=${USER_ID}:${GROUP_ID} ENV PRODUCTS=${PRODUCTS} ENV LANGUAGES=${LANGUAGES} @@ -92,8 +95,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key for Custom Dictionary and Style Guide API -ENV ACCESS_KEY='' +ENV ACCESS_KEY=${ACCESS_KEY} RUN yum update -y --skip-broken && \ yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ diff --git a/Dockerfile.ubuntu-prebuilt b/Dockerfile.ubuntu-prebuilt index d80b124..28b057a 100644 --- a/Dockerfile.ubuntu-prebuilt +++ b/Dockerfile.ubuntu-prebuilt @@ -34,6 +34,9 @@ ARG PROXY_PORT ARG PROXY_USER_NAME ARG PROXY_PASSWORD +# Access Key for Custom Dictionary and Style Guide API +ARG ACCESS_KEY + ENV PROTOCOL=${PROTOCOL} ENV DOMAIN_NAME=${DOMAIN_NAME} ENV WEB_PORT=${WEB_PORT} @@ -60,8 +63,7 @@ ENV ENABLE_REQUEST_STATISTIC=false ENV ENABLE_USER_ACTION_STATISTIC=false ENV ENABLE_REQUEST_VALIDATION=false -# Access Key for Custom Dictionary and Style Guide API -ENV ACCESS_KEY='' +ENV ACCESS_KEY=${ACCESS_KEY} RUN apt-get update && apt-get install -y --no-install-recommends wget