1 # ============LICENSE_START=======================================================
2 # Copyright (c) 2019 QCT. All rights reserved.
3 # Copyright (c) 2022 AT&T. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
20 FROM node:alpine AS builder
21 MAINTAINER Ekko Chang <ekko.chang@qct.io>
23 LABEL org.label-schema.docker.build="docker build -t dl-admin . --no-cache" \
24 org.label-schema.docker.run="docker run -p 80:80 --add-host=dl_feeder:your_feeder_ipaddress dl-admin"
26 ENV NODE_OPTIONS "--openssl-legacy-provider"
37 RUN groupadd -r datalake && useradd -r -g datalake datalake
39 COPY --from=builder /app/dist/* /usr/share/nginx/html/
40 COPY --from=builder /app/dl-admin-nginx.conf /etc/nginx/conf.d/default.conf
41 COPY --from=builder /app/nginx.conf /etc/nginx/nginx.conf
42 COPY --from=builder /app/run.sh /tmp
44 RUN chown -R datalake:datalake /etc/nginx
45 RUN chown -R datalake:datalake /var/cache/nginx
46 RUN chown -R datalake:datalake /tmp/run.sh
47 RUN chmod 0744 /tmp/run.sh
52 CMD ["sh", "-c", "/tmp/run.sh"]