-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 1.39 KB
/
Dockerfile
File metadata and controls
44 lines (35 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM registry.cloudogu.com/official/base:3.23.4-1 AS swaggerui
# renovate: datasource=github-tags depName=swagger-api/swagger-ui extractVersion=^v(?<version>.*)$
ENV SWAGGERUI_VERSION=5.32.4
RUN apk add --no-cache curl
RUN curl -Lsk --fail --silent --location --retry 3 https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${SWAGGERUI_VERSION}.zip -o /tmp/swagger-ui.zip
RUN unzip /tmp/swagger-ui.zip -d /tmp && mv /tmp/swagger-ui-${SWAGGERUI_VERSION}/dist /tmp/dist && rm -f /tmp/swagger-ui.zip
FROM registry.cloudogu.com/official/base:3.23.4-1
LABEL NAME="official/swaggerui" \
VERSION="5.32.4-1" \
maintainer="hello@cloudogu.com"
ENV SERVICE_TAGS=webapp \
NGINX_HOME="/var/www/html"
COPY resources /
RUN set -x -o errexit -o nounset -o pipefail \
&& apk update \
&& apk upgrade \
# install required packages
&& apk --update add openssl pcre zlib nginx \
# change owner of nginx binary
&& chown root:root /usr/sbin/nginx \
# redirect logs
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
# cleanup apk cache
&& rm -rf /var/cache/apk/* \
&& mkdir -p ${NGINX_HOME}
COPY --from=swaggerui /tmp/dist/* ${NGINX_HOME}/
# copy files
# Define working directory.
WORKDIR /etc/nginx
HEALTHCHECK --interval=5s CMD doguctl healthy swaggerui || exit 1
# Expose ports.
EXPOSE 8080
# Define default command.
CMD ["/startup.sh"]