forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.builder
64 lines (54 loc) · 2.6 KB
/
Dockerfile.builder
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Used for testing OpenShift console in CI. After editing this file:
#
# * Bump the builder version in `Dockerfile` and `builder-run.sh`
# * Commit the changes
# * Run `DOCKER_TAG=<new-tag> ./push-builder.sh` to update the image on quay
# (requires edit permission to the quay.io/coreos/tectonic-console-builder repo)
#
# You can test the image using `./builder-run.sh`. For instance:
# $ ./builder-run.sh ./build-backend.sh
FROM golang:1.18-stretch
MAINTAINER Ed Rooth - CoreOS
### For golang testing stuff
RUN go install github.com/jstemmer/go-junit-report@latest
### Install NodeJS and yarn
ENV NODE_VERSION="v14.16.0"
ENV YARN_VERSION="v1.22.10"
# yarn needs a home writable by any user running the container
ENV HOME /opt/home
RUN mkdir -p ${HOME}
RUN chmod 777 -R ${HOME}
RUN apt-get update \
&& apt-get install --no-install-recommends -y -q \
curl wget git unzip bzip2 jq expect \
libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
# ^^ additional Cypress dependencies: https://docs.cypress.io/guides/guides/continuous-integration.html#Dependencies
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.20.4/bin/linux/$(go env GOARCH)/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl
RUN cd /tmp && \
wget --quiet -O /tmp/node.tar.gz \
"http://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-$(go env GOARCH | sed 's/amd64/x64/').tar.gz" && \
tar xf node.tar.gz && \
rm -f /tmp/node.tar.gz && \
cd node-* && \
cp -r lib/node_modules /usr/local/lib/node_modules && \
cp bin/node /usr/local/bin && \
ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
# so any container user can install global node modules if needed
RUN chmod 777 /usr/local/lib/node_modules
# cleanup
RUN rm -rf /tmp/node-v*
RUN cd /tmp && \
wget --quiet -O /tmp/yarn.tar.gz https://github.com/yarnpkg/yarn/releases/download/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz && \
tar xf yarn.tar.gz && \
rm -f /tmp/yarn.tar.gz && \
mv /tmp/yarn-${YARN_VERSION} /usr/local/yarn && \
ln -s /usr/local/yarn/bin/yarn /usr/local/bin/yarn
# Install Chrome for installer gui tests
RUN test "$(go env GOARCH)" = amd64 || exit 0; \
wget --quiet -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' && \
apt-get update && \
apt-get install --no-install-recommends -y -q \
google-chrome-stable ca-certificates