-
Notifications
You must be signed in to change notification settings - Fork 4
How to create Docker Images for Docker Hub
Thuan Nguyen edited this page Jul 28, 2022
·
1 revision
- Create Dockerfile
- Build an image from Dockerfile
docker build -t android-lightweight .
- Run a container based on the image
docker run -it --name android-lightweight-app android-lightweight
- Pull a docker image
- Create a container from it
- Modify or make changes (e.g. install new app in that container)
- Use docker commit command
docker commit android-lightweight-app android-lightweight:latest
- Sign up for Docker Hub
- Create a repository on Docker Hub
- Push image to Docker Hub
- Log in: 1docker login1
- Tag an image: 1docker tag android-lightweight:latest simplatex/android-lightweight:latest1
- Publish the image:
docker push simplatex/android-lightweight:latest
- You can pull and test the image:
docker pull simplatex/android-lightweight:latest
docker run -it simplatex/android-lightweight:latest