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

Commit

Permalink
DEV 2511 use BASE_CONTAINER_VERSION 3.0.0 (#3047)
Browse files Browse the repository at this point in the history
* use BASE_CONTAINER_VERSION 3.0.0

* add labels for docker image
  • Loading branch information
qqiao2024 authored Feb 16, 2024
1 parent bf08ffd commit 1ead75c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 15 deletions.
7 changes: 6 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 . \
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
15 changes: 10 additions & 5 deletions awgportal.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 \
Expand All @@ -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
18 changes: 12 additions & 6 deletions portal.Dockerfile
Original file line number Diff line number Diff line change
@@ -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 . .
Expand All @@ -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
Expand All @@ -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

0 comments on commit 1ead75c

Please sign in to comment.