-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (44 loc) · 1.73 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
FROM ubuntu:17.10
LABEL maintainer="Atomist <[email protected]>"
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
ENV DUMB_INIT_VERSION=1.2.1
RUN curl -s -L -O https://github.com/Yelp/dumb-init/releases/download/v$DUMB_INIT_VERSION/dumb-init_${DUMB_INIT_VERSION}_amd64.deb \
&& dpkg -i dumb-init_${DUMB_INIT_VERSION}_amd64.deb \
&& rm -f dumb-init_${DUMB_INIT_VERSION}_amd64.deb
RUN apt-get update && apt-get install -y \
default-jdk \
docker.io \
git \
maven \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN git config --global user.email "[email protected]" \
&& git config --global user.name "Atomist Bot"
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - \
&& apt-get update \
&& apt-get install -y nodejs \
&& npm i -g [email protected] \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.8.12/bin/linux/amd64/kubectl \
&& chmod +x /usr/local/bin/kubectl \
&& kubectl version --client
RUN curl -sL -o /usr/local/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein \
&& chmod 755 /usr/local/bin/lein \
&& lein version
# Create app directory
RUN mkdir -p /opt/app
WORKDIR /opt/app
ENV BLUEBIRD_WARNINGS 0
ENV NODE_ENV production
ENV NPM_CONFIG_LOGLEVEL warn
ENV SUPPRESS_NO_CONFIG_WARNING true
EXPOSE 2866
ENTRYPOINT [ "dumb-init", "node", "--trace-warnings", "--expose_gc", "--optimize_for_size", "--always_compact", "--max_old_space_size=384" ]
CMD [ "node_modules/@atomist/automation-client/start.client.js" ]
# Install app dependencies
COPY package.json package-lock.json ./
RUN npm ci
# Bundle app source
COPY . .