Issue
How to write a dockerfile and build a dockerimage. i would be grateful for a step by step instructions and illustrations if possible. i am new to usage of docker and we are using on linux platform.
Solution
First you have to install and configure docker in your local machine
Make directory for store docker file
mkdir docker-test cd docker-test
Create docker file in your repository
nano Dockerfile
Add follow line to Dockerfile
FROM docker/whalesay:latest RUN apt-get -y update && apt-get install -y fortunes CMD /usr/games/fortune -a | cowsay
Build docker file run follow command
docker build -t docker-whale .
If you want to further details about build process read full article here.
If you have any problem please comment.
Answered By - Niroshan Ranapathi Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.