-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
67 lines (55 loc) · 1.75 KB
/
Dockerfile
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
FROM ubuntu:bionic
LABEL maintainer="Michael Coleman [email protected]"
LABEL f5.xcs.demo.version="0.0.1-beta"
LABEL f5.xcs.demo.release-date="2022-3-11"
LABEL f5.xcs.demo.git="https://github.com/Mikej81/f5xc-demo-app.git"
LABEL f5.xcs.demo.git.repo="https://github.com/Mikej81/f5xc-demo-app"
ENV DEMO_GROUP=nodegroup \
DEMO_USER=nodeuser \
DEMO_HOME=/nodeuser \
DEBIAN_FRONTEND=noninteractive
WORKDIR ${DEMO_HOME}
RUN useradd -d ${DEMO_HOME} -s /bin/bash -m ${DEMO_USER} -g users && \
chown -R ${DEMO_USER} ${DEMO_HOME} && \
mkdir ${DEMO_HOME}/yarn_cache && \
mkdir ${DEMO_HOME}/yarn_global
COPY . ${DEMO_HOME}/
COPY entrypoint.sh ${DEMO_HOME}/entrypoint.sh
ENV YARN_CACHE_FOLDER=${DEMO_HOME}/yarn_cache\ yarn\ --production
RUN apt-get clean && apt-get -y update && apt-get -y upgrade && \
apt-get install --no-install-recommends -y \
apt-utils \
software-properties-common \
gnupg \
curl && \
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get -y update && apt-get install --no-install-recommends -y \
rpm \
ca-certificates \
apt-transport-https \
iptables \
sudo \
build-essential \
nano \
python3.8 \
python3-pip \
libcairo2-dev \
libdbus-glib-1-dev \
libgirepository1.0-dev \
zlib1g-dev \
pkg-config \
nodejs && \
npm install -g [email protected] && \
npm install -g yarn && \
yarn cache clean --force && \
mkdir ${DEMO_HOME}/.npm-global && \
rm -rf /var/lib/apt/lists/* && \
cd ${DEMO_HOME} && \
chown -R ${DEMO_USER} . && \
yarn
RUN chown -R ${DEMO_USER} ./entrypoint.sh && \
chmod +x ${DEMO_HOME}/entrypoint.sh
USER ${DEMO_USER}
EXPOSE 3000
CMD [ "./entrypoint.sh" ]