diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eba588370..8538eb945 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ include: - project: nci-gdc/gitlab-templates - ref: 0.6.1 + ref: 0.7.0 file: - templates/global/full.yaml - templates/deployments/salt-service.yaml @@ -42,6 +42,11 @@ build: - | docker build \ --build-arg "NPM_REGISTRY=https://nexus.osdc.io/repository/npm-all/" \ + --build-arg BASE_CONTAINER_REGISTRY \ + --build-arg BASE_CONTAINER_VERSION \ + --label org.opencontainers.image.created="$(date -Iseconds)" \ + --label org.opencontainers.image.revision="${CI_COMMIT_SHA}" \ + --label org.opencontainers.image.ref.name="${IMAGE_NAME}:${CI_COMMIT_REF_NAME/\//_}" \ -t $DOCKER_RELEASE_REGISTRY/ncigdc/$IMAGE_NAME:$CI_COMMIT_REF_SLUG-${CI_COMMIT_SHORT_SHA} \ -t $DOCKER_RELEASE_REGISTRY/ncigdc/$IMAGE_NAME:$CI_COMMIT_SHA \ -f $DOCKER_FILE . \ diff --git a/Dockerfile b/Dockerfile index e7bee83ed..d9017c987 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -FROM quay.io/ncigdc/nginx-extras:1.2.0 - -RUN rm -v /etc/nginx/sites-enabled/default +FROM quay.io/ncigdc/nginx-extras:3.0.0 COPY build /usr/share/nginx/html diff --git a/awgportal.Dockerfile b/awgportal.Dockerfile index 606b4b906..754f3e2af 100644 --- a/awgportal.Dockerfile +++ b/awgportal.Dockerfile @@ -1,7 +1,7 @@ -ARG registry=docker.osdc.io -ARG NPM_REGISTRY="https://registry.npmjs.org/" +ARG BASE_CONTAINER_REGISTRY=docker.osdc.io/ncigdc +ARG BASE_CONTAINER_VERSION=3.0.0 FROM node:13 as builder -ARG NPM_REGISTRY +ARG NPM_REGISTRY="https://registry.npmjs.org/" WORKDIR /portal @@ -13,6 +13,7 @@ ENV REACT_APP_WEBSITE_NAME=GDC \ REACT_APP_GDC_AUTH="https://portal.awg.gdc.cancer.gov/auth/"\ REACT_APP_AWG_LOGIN_EXPIRY=20 \ GDC_BASE="/" \ + PUBLIC_URL="/" \ REACT_APP_AWG=true \ REACT_APP_IS_AUTH_PORTAL=true \ # REACT_APP_GDC_DISPLAY_SLIDES=true \ @@ -25,8 +26,12 @@ RUN export REACT_APP_COMMIT_HASH=`git rev-parse --short HEAD` && export REACT_AP RUN npm ci RUN npm run build -FROM ${registry}/ncigdc/nginx-extras:1.2.0 +FROM ${BASE_CONTAINER_REGISTRY}/nginx-extras:${BASE_CONTAINER_VERSION} +ARG NAME=portal-ui-awg -RUN rm -v /etc/nginx/sites-enabled/default +LABEL org.opencontainers.image.title=${NAME} \ + org.opencontainers.image.description="${NAME} container image" \ + org.opencontainers.image.source="https://github.com/NCI-GDC/portal-ui" \ + org.opencontainers.image.vendor="NCI GDC" COPY --from=builder /portal/build /usr/share/nginx/html diff --git a/portal.Dockerfile b/portal.Dockerfile index 9d6cc4c20..a644ce28d 100644 --- a/portal.Dockerfile +++ b/portal.Dockerfile @@ -1,7 +1,8 @@ -ARG registry=docker.osdc.io -ARG NPM_REGISTRY="https://registry.npmjs.org/" +ARG BASE_CONTAINER_REGISTRY=docker.osdc.io/ncigdc +ARG BASE_CONTAINER_VERSION=3.0.0 FROM node:13 as builder -ARG NPM_REGISTRY +ARG NPM_REGISTRY="https://registry.npmjs.org/" + WORKDIR /portal COPY . . @@ -10,7 +11,8 @@ ENV REACT_APP_GDC_DISPLAY_SLIDES=true \ REACT_APP_SLIDE_IMAGE_ENDPOINT="/auth/api/v0/tile/" \ REACT_APP_GDC_AUTH="/auth/" \ REACT_APP_API="/auth/api/v0/" \ - GDC_BASE="/" \ + GDC_BASE="/v1" \ + PUBLIC_URL="/v1" \ REACT_APP_WEBSITE_NAME=GDC \ NODE_PATH=src/packages \ npm_config_registry=$NPM_REGISTRY @@ -20,8 +22,12 @@ RUN export REACT_APP_COMMIT_HASH=`git rev-parse --short HEAD` && export REACT_AP RUN npm ci RUN npm run build -FROM ${registry}/ncigdc/nginx-extras:1.2.0 +FROM ${BASE_CONTAINER_REGISTRY}/nginx-extras:${BASE_CONTAINER_VERSION} +ARG NAME=portal-ui -RUN rm -v /etc/nginx/sites-enabled/default +LABEL org.opencontainers.image.title=${NAME} \ + org.opencontainers.image.description="${NAME} container image" \ + org.opencontainers.image.source="https://github.com/NCI-GDC/portal-ui" \ + org.opencontainers.image.vendor="NCI GDC" COPY --from=builder /portal/build /usr/share/nginx/html