Skip to content

Commit 915caf1

Browse files
improvement: S3C-3776 Dockerfile for kubernetes deployment
Add a Dockerfile that will be used by eve to build images suitable for a dev kubernetes deployment
1 parent bf3525b commit 915caf1

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.git/

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM node:10-slim
2+
3+
WORKDIR /usr/src/app
4+
5+
RUN apt-get update \
6+
&& apt-get install -y --no-install-recommends \
7+
ca-certificates \
8+
build-essential \
9+
libssl-dev \
10+
wget \
11+
bash \
12+
python \
13+
git \
14+
jq
15+
16+
ENV DOCKERIZE_VERSION v0.6.1
17+
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
18+
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
19+
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
20+
21+
COPY package.json yarn.lock /usr/src/app/
22+
RUN yarn install --frozen-lockfile --production \
23+
&& rm -rf /var/lib/apt/lists/* \
24+
&& rm -rf ~/.node-gyp \
25+
&& rm -rf /tmp/yarn-* \
26+
&& mkdir /conf
27+
28+
COPY . /usr/src/app/
29+
30+
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
31+
32+
EXPOSE 8900

docker-entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# set -e stops the execution of a script if a command or pipeline has an error
4+
set -e
5+
6+
exec "$@"

0 commit comments

Comments
 (0)