Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
angular-testt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
angular-testt
Commits
b980c87f
Commit
b980c87f
authored
Nov 19, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Dockerfile
parent
0dab7893
Pipeline
#602
failed with stages
in 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
21 deletions
+15
-21
Dockerfile
Dockerfile
+15
-21
No files found.
Dockerfile
View file @
b980c87f
# Create image based on the official Node 6 image from dockerhub
FROM
node:6
# Create a directory where our app will be placed
RUN
mkdir
-p
/usr/src/app
# Change directory so that our commands run inside this new directory
FROM
node:latest as build
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
git
&&
mkdir
-p
/usr/src/app/
&&
rm
-rf
/var/lib/apt/lists/
*
RUN
npm
install
-g
@angular/cli
RUN
npm
install
-g
npm@latest
ENV
NODE_PATH=/usr/local/lib/node_modules/:/usr/local/lib NODE_ENV=production
WORKDIR
/usr/src/app
# Copy dependency definitions
COPY
package.json /usr/src/app
# Install dependecies
COPY
package.json /usr/src/app/
RUN
npm
install
# Get all the code needed to run the app
COPY
. /usr/src/app
# Expose the port the app runs in
EXPOSE
4200
# Serve the app
CMD
["npm", "start"]
RUN
npm
install
node-sass@latest
COPY
. /usr/src/app/
RUN $(
npm bin
)
/ng build
--sourcemap
=
false
FROM
nginx:latest
COPY
nginx/default.conf /etc/nginx/conf.d/
RUN
rm
-rf
/usr/share/nginx/html/
*
COPY
--from=build /usr/src/app/dist /usr/share/nginx/html
CMD
["nginx", "-g", "daemon off;"]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment