I want to create a image for my nodejs app. I have a total code which is running on CentOS. I created a account in docker and uploaded the image using below statements.
docker build -t my-nodejs-app . docker tag telednacomm/my-nodejs-app:latest telednacomm/node:ravi docker push telednacomm/node:ravi
Later in another server I am using
docker pull telednacomm/node:ravi
Here its not running as I expected.
Here is my Dockerfile
# Set in what directory commands will run
# Put all our code inside that directory that lives in the container
ADD . /home/app
# Install dependencies
mkdir -p /home/app && \
mkdir -p /home/Node && \
cd /home/Node && \
wget https://nodejs.org/dist/v6.2.2/node-v6.2.2-linux-x64.tar.gz && \
tar -zxvf node-v6.2.2-linux-x64.tar.gz && \
cd /usr/bin && \
ln -s /home/Node/node-v6.2.2-linux-x64/bin/node node && \
ln -s /home/Node/node-v6.2.2-linux-x64/bin/npm npm
# replace this with your application's default port
# The command to run our app when the container is run
CMD ["node", "app.js"]
Is this the right way to mention the Dockerfile??? After pulling the image I expected my code in /home/app. But I am not getting the code. How its actually works??? What am i missing???