-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.builder
More file actions
69 lines (60 loc) · 1.72 KB
/
Dockerfile.builder
File metadata and controls
69 lines (60 loc) · 1.72 KB
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
65
66
67
68
69
ARG BASE_IMAGE=ubuntu
ARG BASE_IMAGE_RELEASE=latest
ARG BRANCH
ARG NODE_MAJOR
FROM $BASE_IMAGE:$BASE_IMAGE_RELEASE
# get arg
ARG BRANCH
ARG NODE_MAJOR
# convert arg to env
ENV NODE_MAJOR=$NODE_MAJOR
ENV BRANCH=$BRANCH
RUN echo current branch is $BRANCH
RUN echo NODE release is $NODE_MAJOR
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
git \
gnupg \
ca-certificates \
curl \
dpkg \
python3 \
devscripts \
wget \
ca-certificates
# install yarn npm nodejs
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y --no-install-recommends nodejs && \
npm -g install yarn
## install package for html5validator
#RUN apt-get update -y && \
# apt-get install -y --no-install-recommends \
# python3-pip \
# openjdk-8-jre \
# python3-venv
# install html5validator
#RUN python3 -m venv myenv && /myenv/bin/pip3 install html5validator
# copy /var/webModules
# to run make install
#
COPY . /var/webModules
#
# run makefile step by step
# to get troubleshooting info
#
# install less
# less is required
RUN npm install --global less
# run make install
WORKDIR /var/webModules
RUN make install
RUN make prod
# create version.json file
RUN ./mkversion.sh && cat version.json
# run html5validator
# RUN cd /var/webModules && /myenv/bin/html5validator index.html