Professional Documents
Culture Documents
A Beginner's Guide to
the Dockerfile
-2-
Share this
Codeship Guid
e
A Beginner's Guide
to the Dockerfile
The humble but powerful Dockerfile is the building block
of Docker images and containers. In essence, it's a list
of commands the Docker engine runs to assemble the
image, and thus instances of images as containers.
-3-
Share this
Codeship Guid
e
-4-
Share this
Codeship Guid
e
-5-
Share this
Codeship Guid
e
1 dockerfile RUN
2 mkdir -p /home/jekyll
3 groupadd -rg 1000 jekyll
CODE
-6-
Share this
Codeship Guid
e
You can also copy the files into the container, but this
makes the image less flexible:
CODE
Next, set the directory that contains the site, and serve
the site.
CODE
-7-
Share this
Codeship Guid
e
Now when you rebuild and rerun the container, the gems
added will be available.
-8-
Share this
Codeship Guid
e
1 docker login
-9-
Share this
Codeship Guid
e
- 10 -
Share this
Codeship Guid
e
- 11 -
Share this
Codeship Guid
e
- 12 -
Share this
Codeship Guid
e
Orchestrate Containers
with Docker Compose.
EBOOKS
- 13 -
Share this
Codeship Guid
e
About Codeship.
Codeship is a hosted Continuous Integration service that fits all your needs.
Codeship Basic provides pre-installed dependencies and a simple setup UI
that let you incorporate CI and CD in only minutes. Codeship Pro has native
Docker support and gives you full control of your CI and CD setup while
providing the convenience of a hosted solution.