-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Dockerfile
31 lines (23 loc) · 653 Bytes
/
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
FROM node:18.16.0
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install python
# RUN apk add --no-cache --update g++ gcc libgcc libstdc++ linux-headers make python
# Setup node envs
ARG NODE_ENV
ENV NODE_ENV $NODE_ENV
# Install dependencies
COPY package.json /usr/src/app/
RUN npm install && npm cache clean --force
# Copy required src (see .dockerignore)
COPY . /usr/src/app
# Set graphite hostname to "graphite"
RUN \
ls -la && \
cp -v exampleConfig.js config.js && \
sed -i 's/graphite.example.com/graphite/' config.js
# Expose required ports
EXPOSE 8125/udp
EXPOSE 8126
# Start statsd
ENTRYPOINT [ "node", "stats.js", "config.js" ]