-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
55 lines (46 loc) · 1.62 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
FROM node:latest
# Create app directory
WORKDIR /usr/src/app
# install debugging tools
RUN apt-get update && apt-get install -y \
iotop \
iftop \
tcpdump \
vim \
nethogs \
iftop \
net-tools \
dnsutils \
ethtool \
sysstat \
iputils-tracepath \
libpcap-dev zlib1g-dev \
libpcap-dev
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY . .
RUN chmod 755 commands.sh
#####################################################################
######################### CADVISOR ##################################
#####################################################################
RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
rm -rf /var/cache/apk/*
# Grab cadvisor from the staging directory.
#ADD cadvisor /usr/bin/cadvisor
RUN wget https://github.com/sachaos/tcpterm/releases/download/v0.0.2/tcpterm_linux_amd64 -O /usr/bin/tcpterm && chmod 755 /usr/bin/tcpterm
RUN wget https://github.com/google/cadvisor/releases/download/v0.35.0/cadvisor -O /usr/bin/cadvisor
EXPOSE 8080
ENV CADVISOR_HEALTHCHECK_URL=http://localhost:8080/healthz
HEALTHCHECK --interval=30s --timeout=3s \
CMD wget --quiet --tries=1 --spider $CADVISOR_HEALTHCHECK_URL || exit 1
RUN cd httpflow && make && make install
EXPOSE 8282 8181
#ENTRYPOINT [ "commands.sh" ]
#ENTRYPOINT ["/usr/bin/cadvisor", "-logtostderr"]
ENTRYPOINT ["node", "server.js" ]