blob: 9af10cc3c23041b34de400839f188717d5b656c5 [file] [log] [blame]
stattaa3a04c52019-08-23 16:49:45 -04001ARG FE_BASE_IMAGE=httpd:2.4.34-alpine
2FROM ${FE_BASE_IMAGE}
3
4ARG FE_DIR=build/public
5ARG HTTP_PROXY
6ARG HTTPS_PROXY
7# ARG PORTAL_CERT=truststoreONAPall.jks
8
9ARG FECONTEXT=ONAPPORTAL
10
11ENV http_proxy $HTTP_PROXY
12ENV https_proxy $HTTPS_PROXY
13RUN if [ -d /etc/apt ] && [ ! -z ${HTTP_PROXY} ]; then echo "Acquire::http::proxy \"${HTTP_PROXY}\";" >> /etc/apt/apt.conf; fi && \
14 if [ -d /etc/apt ] && [ ! -z ${HTTPS_PROXY} ]; then echo "Acquire::https::proxy \"${HTTPS_PROXY}\";" >> /etc/apt/apt.conf; fi
15
16RUN addgroup -g 1000 -S portal && adduser -u 1000 -S portal -G portal && chown -R portal:portal . && rm /usr/local/apache2/htdocs/index.html
17
18USER portal:portal
19
20COPY ${FE_DIR} /usr/local/apache2/htdocs/${FECONTEXT}