forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.product
47 lines (39 loc) · 1.55 KB
/
Dockerfile.product
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM openshift/origin-base
ENV GOPATH=/go
ENV container=oci
RUN mkdir -p /go/src/github.com/openshift/console/
ADD . /go/src/github.com/openshift/console/
WORKDIR /go/src/github.com/openshift/console/
ADD etc/ssl /etc/ssl
# TODO: Switch to multistage builds as soon as we can.
#
# Multi stage builds are not yet supported for product builds. For now, install
# dependencies and do our best to clean up after building.
#
# Node.js 8+ is required, but EPEL only has Node.js 6.
#
# `rm -rf /tmp/*` is needed to remove chromedriver and other temporary files
# created while building frontend assets.
RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - && \
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \
INSTALL_PKGS="git golang nodejs yarn" && \
yum install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
./build.sh && \
mkdir -p /opt/bridge/bin && \
cp -R frontend/public/dist /opt/bridge/static && \
cp bin/bridge /opt/bridge/bin && \
yarn cache clean && \
yum autoremove -y $INSTALL_PKGS && \
yum clean all && \
rm /etc/yum.repos.d/yarn.repo && \
rm -rf /tmp/* && \
rm -rf /go
WORKDIR /
LABEL io.k8s.display-name="OpenShift Console" \
io.k8s.description="This is a component of OpenShift Container Platform and provides a web console." \
io.openshift.tags="openshift" \
maintainer="Samuel Padgett <spadgett@redhat.com>"
# doesn't require a root user.
USER 1001
CMD [ "/opt/bridge/bin/bridge", "--public-dir=/opt/bridge/static" ]