Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Update Dockerfile #468

Merged
merged 8 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Egeria project

**/.git
sarbull marked this conversation as resolved.
Show resolved Hide resolved
**/.github
/node_modules
29 changes: 19 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Egeria project

FROM public.ecr.aws/nginx/nginx:latest
# Stage 1 - Build
FROM node:16.13.0 AS builder
sarbull marked this conversation as resolved.
Show resolved Hide resolved

ARG version=1.4.0
WORKDIR /app
COPY . /app
RUN npm install
RUN npm run build:docker
sarbull marked this conversation as resolved.
Show resolved Hide resolved

# Stage 2 - Containerize
FROM registry.access.redhat.com/ubi8/nginx-120:1.71

ARG version=4.0.2
sarbull marked this conversation as resolved.
Show resolved Hide resolved
ARG VCS_REF=unknown
ARG VCS_ORIGIN=unknown
ARG BUILD_TIME=unknown
ARG VCS_DATE=unknown

# Labels from https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys (with additions prefixed ext)
LABEL org.opencontainers.image.vendor = "odpi" \
org.opencontainers.image.title = "egeria-ui" \
org.opencontainers.image.description = "Static Web Content to support the ui server chassis" \
org.opencontainers.image.url = "https://egeria.odpi.org/" \
org.opencontainers.image.description = "User interface instance using main Egeria functionalities." \
org.opencontainers.image.url = "https://egeria-project.org/" \
org.opencontainers.image.source = "$VCS_ORIGIN" \
org.opencontainers.image.authors = "ODPi Egeria" \
org.opencontainers.image.authors = "Egeria Contributors" \
org.opencontainers.image.revision = "$VCS_REF" \
org.opencontainers.image.licenses = "Apache-2.0" \
org.opencontainers.image.created = "$BUILD_TIME" \
org.opencontainers.image.version = "$version" \
org.opencontainers.image.documentation = "https://egeria.odpi.org/open-metadata-resources/open-metadata-deployment/docker/egeria-ui/" \
org.opencontainers.image.documentation = "" \
org.opencontainers.image.ext.vcs-date = "$VCS_DATE" \
org.opencontainers.image.ext.docker.cmd = "docker run -p 80:80 -d odpi/egeria-ui:latest" \
org.opencontainers.image.ext.docker.debug = "" \
org.opencontainers.image.ext.docker.params = ""

# Just copy the built files & serve via nginx
COPY build/ /var/www/
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /app/build /var/www/
COPY etc/nginx.conf /etc/nginx/conf.d/default.conf
CMD ["nginx", "-g", "daemon off;"]
ENTRYPOINT ["nginx", "-g", "daemon off;"]