Lab4 Dockerfile

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

LPI DevOps Tools Engineer Labs

Lab 4 – Dockerfile
Build docker image
Build image from scratch
1. Write a C program that displays "Hello DevOps !! ".

2. Compile the program with a static library.

3. Write a dockerfile file with the following content:


FROM scratch
COPY app app
CMD ["./app"]

4. Build image myapp:1.0

1/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

5. Create new container with builded image.

Build mediawiki images


6. Clone the following mediawiki project from the remote repository :
https://github.com/brahimhamdi/wikimedia
Change to the wikimedia folder

2/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

7. Describe the Dockerfile in the wiki_app folder.

Based on this Dockerfile, build wiki_app:1.0 image and then test it.

8. Describe the Dockerfile in the wiki_db folder.

3/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

Based on this Dockerfile, build wiki_db:1.0 image and then test it.

9. Install the application.

Build dockercoins images


10. Clone the following dockercoins project from the remote repository :
https://github.com/brahimhamdi/dockercoins

4/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

11. Describe all Dockerfiles in the project.

5/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

12. Based on Dockerfiles, build all images of this projects. And then test them.

6/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

7/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

Push docker images to remote registry


13. Create an account in hub.docker.com/ registry.

14. Tags all images with your GitHub username and push them to dockerhub registry.

8/9 Brahim HAMDI


LPI DevOps Tools Engineer Labs

15. Delete locally all pushed images.

Test pushed images.

9/9 Brahim HAMDI

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy