https://github.com/abhishek010397/scratch-docker-image
https://github.com/abhishek010397/scratch-docker-image
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abhishek010397/scratch-docker-image
- Owner: Abhishek010397
- Created: 2020-07-07T13:09:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-07T16:40:08.000Z (over 5 years ago)
- Last Synced: 2025-02-15T11:18:46.574Z (8 months ago)
- Language: Dockerfile
- Size: 796 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scratch-Docker-Image
We are using our Ubuntu 16.04 LTS Desktop for creating base image.Hence,all commands are for debian/ubuntu system.
1.Login as root or superuser.
Either login as root or become superuser by using command sudo su
2.Create directory for docker image workshop,
Create directory for docker base image work and change to after creating it.
mkdir -p /opt/docker_base_images
cd /opt/docker_base_images
3.Install debootstrap
apt install debootstrap
4. Run debootstrap
debootstrap bionic bionic > /dev/null
5. Explore the newly created docker image directory
ls bionic/
cat bionic/etc/lsb-release
output:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
6.Now import the docker image in local system.
sudo tar -C bionic -c . | docker import - bionic
7. List docker images
docker images
8. Verify the new docker image
docker run bionic cat /etc/lsb-release
9. Tag and push the image to docker-registry.