Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blendb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
C3SL
blendb
Commits
99896bbf
There was a problem fetching the pipeline summary.
Commit
99896bbf
authored
7 years ago
by
Lucas Fernandes de Oliveira
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/53' into 'master'
Issue
#53
: Add Dockerfile and .dockerignore See merge request
!48
parents
dcaecb33
c6f21eeb
Branches
Branches containing commit
No related tags found
1 merge request
!48
Issue #53: Add Dockerfile and .dockerignore
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.dockerignore
+12
-0
12 additions, 0 deletions
.dockerignore
Dockerfile
+51
-0
51 additions, 0 deletions
Dockerfile
with
63 additions
and
0 deletions
.dockerignore
0 → 100644
+
12
−
0
View file @
99896bbf
/artwork
/config
/coverage
/database
/doc
/node_modules
nodemon.json
/service
/.git
*.swp
*.log
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
51
−
0
View file @
99896bbf
# Avoid the use of floating tags like: latest, boron, argon and carbon
ARG
VERSION=6.12.2
FROM
node:$VERSION
LABEL
autor="C3SL - Centro de Computação Científica e Software Livre"
# Node was not designed to run as PID 1 (process in docker run with PID 1).
# Its recommended to use the flag --init or use tine to start node process
# in docker
# Add Tini
ENV
TINI_VERSION="v0.16.1" WORKSPACE="/home/node/app/"
ADD
https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY
package*.json $WORKSPACE
RUN
\
chmod
+x /tini
&&
\
chown
-R
node:node
$WORKSPACE
USER
node
WORKDIR
$WORKSPACE
RUN
npm
install
# Bundle app source
# COPY copy files as root so chown must be used
USER
root
COPY
. .
RUN
find
.
-user
root | xargs
chown
node:node
USER
node
VOLUME
["/home/node/app/config"]
EXPOSE
3000
HEALTHCHECK
CMD curl -f http://localhost:3000/v1/metrics || exit 1
# Instead of using npm start to start the container, directly put the command
# that npm start executes.
# First off this reduces the number of processes running inside of your container
# Secondly it causes exit signals such as SIGTERM and SIGINT to be received by
# the Node.js process instead of npm swallowing them.
ENTRYPOINT
["/tini", "--"]
CMD
["node", "index" ]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment