-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (35 loc) · 1.13 KB
/
Dockerfile
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
FROM node:10 AS build
# separate COPY and RUN commands to use docker build cache
COPY swagger-ui/package.json /usr/share/build/swagger-ui/package.json
COPY swagger-ui/package-lock.json /usr/share/build/swagger-ui/package-lock.json
WORKDIR /usr/share/build/swagger-ui
RUN npm i
COPY / /usr/share/build/
RUN npm run build
FROM registry.cloudogu.com/official/base:3.10.3-2
LABEL NAME="official/swaggerui" \
VERSION="3.25.0-2" \
maintainer="[email protected]"
ENV SERVICE_TAGS=webapp
RUN set -x \
&& apk update \
# 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 /var/www/html
# copy files
COPY resources /
COPY --from=build /usr/share/build/swagger-ui/dist/* /var/www/html/
# Define working directory.
WORKDIR /etc/nginx
HEALTHCHECK CMD doguctl healthy swaggerui || exit 1
# Expose ports.
EXPOSE 8080
# Define default command.
CMD ["/startup.sh"]