- Run a basic
hello-worldcontainer to verify Docker is working. - Check container status.
- Restart a stopped container.
- Remove the container and its image.
- Start an Ubuntu or CentOS container in interactive mode.
- Run
echo dockerinside the container. - Create a file named
hello-docker. - Remove the container and note that temporary files are lost.
- Run a MySQL container with the name
app-database. - Use the
-eflag to setMYSQL_ROOT_PASSWORD. - Ensure the container runs in detached mode.
- Start an Nginx container.
- Add static HTML files to the container.
- Verify that the files are accessible.
- Commit the changes to create a new image.
- Attach a volume for static files.
- Remove the container and reattach the volume.
- Map port 80 to 9898 and access it in the browser.
- Run an Nginx container with two volumes (HTML files & config).
- Modify the HTML content.
- Restart the container using both volume mount and bind mount.
- Map port 80 to 8080 and verify accessibility.
- Create a Dockerfile for an Nginx image with custom content.
- Modify the
nginx.confto listen on port 8080 instead of 80. - Build and run the custom image.
- Create a ReactJS application.
- Write a Dockerfile to containerize it.
- Test the application inside a Docker container.
- Bonus: Optimize the image using multi-stage builds.
- Build a React app container.
- Push it to Docker Hub.
- Write a Dockerfile for an Ubuntu image that sleeps by default for 5 seconds.
- Allow the sleep time to be overridden via Docker command-line arguments.
- Implement using ENTRYPOINT and CMD.
- Tag and push the images from previous problems to Docker Hub.
- Ensure authentication and correct repository naming.
- Create two Nginx containers on a custom bridge network.
- Use
curlfrom one container to access the other’s content. - Verify connectivity and test communication.
- Clone the repository or create files manually.
- Follow the steps in each lab.
- Use
docker build,docker run, anddocker networkcommands as required. - Verify container output using
curlor a web browser.
Let me know if you need modifications! 🚀