-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.plugins.demo
33 lines (24 loc) · 1.1 KB
/
Dockerfile.plugins.demo
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
# This image is used for testing OpenShift Console dynamic plugin capabilities.
#
# See frontend/dynamic-demo-plugin/README.md for details.
# Stage 0: build the demo plugin
FROM quay.io/coreos/tectonic-console-builder:v22 AS build
RUN mkdir -p /src/console
COPY . /src/console
WORKDIR /src/console/frontend
RUN yarn install
WORKDIR /src/console/frontend/dynamic-demo-plugin
RUN yarn install && \
yarn build
# Stage 1: build the target image
FROM node:10
COPY --from=build /src/console/frontend/dynamic-demo-plugin/dist /opt/console-demo-plugin/static
COPY --from=build /src/console/frontend/dynamic-demo-plugin/node_modules /opt/console-demo-plugin/node_modules
COPY --from=build /src/console/frontend/dynamic-demo-plugin/http-server.sh /opt/console-demo-plugin/http-server.sh
LABEL io.k8s.display-name="OpenShift Console Demo Plugin" \
io.k8s.description="Sample OpenShift Console dynamic plugin used for testing purposes." \
io.openshift.tags="openshift" \
maintainer="Vojtech Szocs <[email protected]>"
USER node
WORKDIR /opt/console-demo-plugin
ENTRYPOINT [ "./http-server.sh", "./static" ]