Last active
          October 12, 2018 20:06 
        
      - 
      
 - 
        
Save dalenguyen/be47d51153284035b32ebdaebb4cc191 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
Dale Nguyen revised this gist
Oct 12, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,6 +12,8 @@ COPY . . # Bower for install old packages - you may not need it # Change root password to Docker!@ # Add user name admin to run command without root # If you don't want to add custom user, just use the default node user: # USER node instead of USER admin # Change folders' owner to admin RUN apt-get update \ && apt-get install sudo -y \  - 
        
Dale Nguyen created this gist
Oct 10, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ # I'm using NODE 6, you can change to NODE 8 or 10 FROM node:6 # This will be the current working dir WORKDIR /usr/src/app # I copy entire project to the working dir COPY . . # Root commands # Install sudo, vim to make changes for your project files # Bower for install old packages - you may not need it # Change root password to Docker!@ # Add user name admin to run command without root # Change folders' owner to admin RUN apt-get update \ && apt-get install sudo -y \ && apt-get install vim -y \ && npm install -g bower \ && mkdir /home/admin \ && echo "root:Docker!@" | chpasswd \ && useradd admin && echo "admin:admin" | chpasswd && adduser admin sudo \ && chown -R admin:admin /home/admin \ && chown -R admin:admin /usr/src/app # Run project under user admin USER admin # Install bower packages RUN bower install # Install node packages RUN npm install # Open port for communication EXPOSE 3000 # This will run the project when starts a container CMD ./node_modules/gulp/bin/gulp.js serve