diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fee47a..1219d3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v4.9.0-2] - 2023-04-21 +### Changed +- Update base image to Version 3.15.8-1 (#22) + +### Removed +- curl, wget (#22) + ## [v4.9.0-1] - 2022-04-13 ### Fixed - Upgrade zlib to fix [CVE-2018-25032](https://security.alpinelinux.org/vuln/CVE-2018-25032); #13 diff --git a/Dockerfile b/Dockerfile index f00b30d..2c466fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,17 @@ -FROM registry.cloudogu.com/official/base:3.15.3-1 +FROM registry.cloudogu.com/official/base:3.15.8-1 as swaggerui +ENV SWAGGERUI_VERSION=4.9.0-1 \ + SWAGGERUI_ZIP_SHA256="0bfecf30a09247936eed6ec2d5d8ddba3b1a847e24017cd3876ddce5b33736ce" +RUN apk update && apk add curl +RUN curl -Lsk --fail --silent --location --retry 3 https://github.com/cloudogu/swagger-ui/releases/download/v${SWAGGERUI_VERSION}/swagger-ui-${SWAGGERUI_VERSION}.zip -o /tmp/swagger-ui.zip +RUN echo "${SWAGGERUI_ZIP_SHA256} */tmp/swagger-ui.zip" | sha256sum -c - +RUN unzip /tmp/swagger-ui.zip -d /tmp + +FROM registry.cloudogu.com/official/base:3.15.8-1 LABEL NAME="official/swaggerui" \ - VERSION="4.9.0-1" \ + VERSION="4.9.0-2" \ maintainer="hello@cloudogu.com" ENV SERVICE_TAGS=webapp \ -SWAGGERUI_VERSION=4.9.0-1 \ -SWAGGERUI_ZIP_SHA256="0bfecf30a09247936eed6ec2d5d8ddba3b1a847e24017cd3876ddce5b33736ce" \ NGINX_HOME="/var/www/html" COPY resources / @@ -22,20 +28,16 @@ RUN set -x -o errexit -o nounset -o pipefail \ && ln -sf /dev/stderr /var/log/nginx/error.log \ # cleanup apk cache && rm -rf /var/cache/apk/* \ - && mkdir -p ${NGINX_HOME} \ - # install swaggerui from fork https://github.com/cloudogu/swagger-ui/releases/ \ - && curl -Lsk --fail --silent --location --retry 3 https://github.com/cloudogu/swagger-ui/releases/download/v${SWAGGERUI_VERSION}/swagger-ui-${SWAGGERUI_VERSION}.zip -o /tmp/swagger-ui.zip \ - && echo "${SWAGGERUI_ZIP_SHA256} */tmp/swagger-ui.zip" | sha256sum -c - \ - && unzip /tmp/swagger-ui.zip -d ${NGINX_HOME} \ - && mv ${NGINX_HOME}/dist/* ${NGINX_HOME} \ - # cleanup - && rm -r ${NGINX_HOME}/dist && rm /tmp/swagger-ui.zip + && mkdir -p ${NGINX_HOME} + +# install swaggerui from fork https://github.com/cloudogu/swagger-ui/releases/ \ +COPY --from=swaggerui /tmp/dist/* ${NGINX_HOME}/ # copy files # Define working directory. WORKDIR /etc/nginx -HEALTHCHECK CMD doguctl healthy swaggerui || exit 1 +HEALTHCHECK --interval=5s CMD doguctl healthy swaggerui || exit 1 # Expose ports. EXPOSE 8080 diff --git a/docs/development/local_setup_de.md b/docs/development/local_setup_de.md index 1832e3e..5e8cd20 100644 --- a/docs/development/local_setup_de.md +++ b/docs/development/local_setup_de.md @@ -2,6 +2,7 @@ ## Anleitung +(Achtung veraltet!) ```bash Auf dem Host System 1. cd swaggerui (ins swaggerui dogu repo) @@ -9,4 +10,17 @@ Auf dem Host System 3. git submodule update (zieht sich cloudogu/swagger-ui) Im lokalen CES 4. cd swaggerui && cesapp build . && cesapp start swaggerui -``` \ No newline at end of file +``` + +(ab v4.0.0-1) +``` +Releases werden in https://github.com/cloudogu/swagger-ui/releases gepfelgt +und entsprechend im Dockerfile referenziert. Das Release beinhaltet aktuell den dist folder. + +1. Artefakt erstellen +im repository root +zip -r swagger-ui-4.9.0-1.zip dist +2. Checksum generieren +sha256sum swagger-ui-4.9.0-1.zip > swagger-ui-4.9.0-1.zip.sha256 +3. Dem Release anfügen https://github.com/cloudogu/swagger-ui/releases +``` diff --git a/docs/development/local_setup_en.md b/docs/development/local_setup_en.md index 3e0c28d..0b9d01d 100644 --- a/docs/development/local_setup_en.md +++ b/docs/development/local_setup_en.md @@ -2,6 +2,7 @@ ## Instruction +(Attention changed since v4.9.0-1) ```bash On the host system 1. cd swaggerui (into swaggerui dogu repo) @@ -9,4 +10,16 @@ On the host system 3. git submodule update (pulls cloudogu/swagger-ui) In the local CES 4. cd swaggerui && cesapp build . && cesapp start swaggerui -``` \ No newline at end of file +``` + +### Setup since 4.9.0-1 +Releases can be found here https://github.com/cloudogu/swagger-ui/releases. +please reference new version inside the Dockerfile. The release currently consists only of the dist folder. +``` +1. create artefact zip +inside the src repository root (https://github.com/cloudogu/swagger-ui/) +zip -r swagger-ui-4.9.0-1.zip dist +2. generate the checksum +sha256sum swagger-ui-4.9.0-1.zip > swagger-ui-4.9.0-1.zip.sha256 +3. add the artefacts to the release https://github.com/cloudogu/swagger-ui/releases +``` diff --git a/dogu.json b/dogu.json index d7cf015..9768594 100644 --- a/dogu.json +++ b/dogu.json @@ -1,6 +1,6 @@ { "Name": "official/swaggerui", - "Version": "4.9.0-1", + "Version": "4.9.0-2", "DisplayName": "Swagger UI", "Description": "Swagger UI displays your openAPI specification.", "Logo": "https://github.com/cloudogu/swagger-ui/blob/master/src/img/logo_small.png?raw=true",