-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
bf3525b
commit 915caf1
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
.git/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |