Reputation: 399
Can any one guide me how to create and edit a Dockerfile in boot2docker to create my own image? I am not sure which commands to use to edit the Dockerfile when in Boot2Docker shell.
Upvotes: 0
Views: 768
Reputation: 12200
A Dockerfile is simply a text file with line-by-line instructions to build an image. So you edit it with any text editor.
See the Docker page for further details on what to put inside.
Upvotes: 0
Reputation: 525
I wonder why you are looking to create your Dockerfile directly from the boot2docker shell. Once boot2docker is installed on your computer, you can directly create normally a Dockerfile from your shell. To do so, follow my steps :
Launch boot2docker and exports the env variables as requested (copy and paste the last three lines)
Write the simplest test Dockerfile you can!
Build it (we will call our image 'test')
Let's run our image
Now you just have to adapt my example to do what you want. Keep in mind that in this example the container we launched is now stopped because nothing kept it alive. For most common cases, you will have something (like a server) which will keep your container running. I hope it will help you!
Upvotes: 1