Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
O orientation
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 36
    • Merge requests 36
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Newbies
  • orientation
  • Wiki
  • dockerBasics

dockerBasics · Changes

Page history
Update dockerBasics authored Jun 15, 2020 by Yogesh Hegde's avatar Yogesh Hegde
Hide whitespace changes
Inline Side-by-side
Showing with 12 additions and 11 deletions
+12 -11
  • dockerBasics.md dockerBasics.md +12 -11
  • No files found.
dockerBasics.md
View page @ 2477732b
......@@ -7,8 +7,8 @@
# Index
1. [Docker Terminologies](#docker-terminologies)
2. [Docker Installation (ubuntu16.04)](#docker-installation)
4. [Docker Basic Command](#docker-basic-command)
5. [Creating Docker application](#creating-an-application)
4. [Docker Basic Command](#docker-basic-commands)
5. [Common Docker operations](#creating-an-application)
## Why docker ?
......@@ -144,7 +144,7 @@ Typically, you will be using docker in the given flow.
---
Commands for doing the operations on docker are
Example of the above flow:
**1. Download the docker.**
......@@ -152,21 +152,18 @@ Commands for doing the operations on docker are
docker pull snehabhapkar/trydock
```
This is an empty docker image.
**2. Run the docker image with this command.**
```shell
docker run -ti snehabhapkar/trydock /bin/bash
```
Which will output like this
Which will output like this, this means that now you are running the docker container and you are inside the container.
```shell
root@e0b72ff850f8:/#
```
This will create a container ID in your system for this image. Container ID in my case is e0b72ff850f8.
Every running container has an ID in your system. Container ID in my case is `e0b72ff850f8`.
**3. Let copy our code inside docker with this command.** (Make sure you are not inside docker terminal, enter `exit` in command line to get out of container terminal)
......@@ -198,6 +195,7 @@ docker cp requirements.sh e0b72ff850f8:/
```
**4. Install dependencies**
If you want to install additional dependencies then you can, write all the steps for installation in a shell script and run the script inside the container.
* Give permission to run shell script
......@@ -228,7 +226,7 @@ docker commit e0b72ff850f8 snehabhapkar/trydock
where e0b72ff850f8 is the containerID.
**7. Push docker image to the dockerhub and share repository name in the summary of assignment.**
**7. Push docker image to the dockerhub.**
* Tag image name with different name
......@@ -238,13 +236,16 @@ docker tag snehabhapkar/trydock username/repo
where username is your username on dockerhub and repo is the name of image.
For example:
```sh
docker tag snehabhapkar/trydock yh42/trial-dock-img
```
* Push on dockerhub
```shell
docker push username/repo
```
and submit the link to your repository in the docker summary.
Clone repository
  • 20hrLearning
  • Code Workspace
  • Culture
  • FAQ
  • Home
  • Installing Required Tools
  • codeworkspace
  • codingStyle
  • coding_style_c_cpp
  • coding_style_python
  • dockerBasics
  • gitBasics
  • gitlabBasics
  • install tools ubuntu 16.04
  • install tools windows
View All Pages