Skip to content

Commit

Permalink
improvement: S3C-3776 Dockerfile for kubernetes deployment
Browse files Browse the repository at this point in the history
Add a Dockerfile that will be used by eve to build images suitable for
a dev kubernetes deployment
  • Loading branch information
jonathan-gramain committed Feb 13, 2021
1 parent bf3525b commit 915caf1
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.git/
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM node:10-slim

WORKDIR /usr/src/app

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
libssl-dev \
wget \
bash \
python \
git \
jq

ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

COPY package.json yarn.lock /usr/src/app/
RUN yarn install --frozen-lockfile --production \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf ~/.node-gyp \
&& rm -rf /tmp/yarn-* \
&& mkdir /conf

COPY . /usr/src/app/

ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]

EXPOSE 8900
6 changes: 6 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# set -e stops the execution of a script if a command or pipeline has an error
set -e

exec "$@"

0 comments on commit 915caf1

Please sign in to comment.