forked from kbase/narrative
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile2
33 lines (24 loc) · 1.11 KB
/
Dockerfile2
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
# Mini dockerfile to serve up narrative version until we can migrate this into
# the narrative method service
FROM nginx:stable-alpine
# These ARGs values are passed in via the docker build command
ARG BUILD_DATE
ARG VCS_REF
ARG BRANCH=develop
ARG NARRATIVE_VERSION
ARG NARRATIVE_GIT_HASH
EXPOSE 80
RUN echo >/usr/share/nginx/html/narrative_version '{"version":"'${NARRATIVE_VERSION}'","git_hash":"'${NARRATIVE_GIT_HASH}'"}' && \
cat /usr/share/nginx/html/narrative_version
# Replace index file with redirect to www.kbase.us
RUN echo >/usr/share/nginx/html/index.html '<html>\
<head><meta http-equiv="refresh" content="0; url=http://www.kbase.us/"> \
<script type="text/javascript">window.location.href = "http://www.kbase.us"</script> \
</head></body></html>'
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/kbase/narrative.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0-rc1" \
us.kbase.vcs-branch=$BRANCH \
us.kbase.narrative-version=$NARRATIVE_VERSION \
maintainer="William Riehl [email protected]"