-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Referred to the UUID
- Loading branch information
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,17 +21,20 @@ We can now start the container in detached mode: | |
docker run -td escomp/cesm-2.2:latest | ||
``` | ||
![alt text](img/Docker_run.png "Docker run") | ||
Take note of the UUID long identifier which starts with *192df0aa73*: this string has been randomly generated by | ||
the Docker daemon. | ||
|
||
To start an interactive processe like a bash shell we use *docker exec ... bash* | ||
(Notice that *-t* is to allocate a pseudo-tty and *-i* to keep STDIN open even if not attached) | ||
|
||
To start an interactive processe like a bash shell we use *docker exec ... bash* with the first letters of the UUID | ||
(here *-t* is to allocate a pseudo-tty and *-i* to keep STDIN open even if not attached): | ||
``` | ||
docker exec -it 192 bash | ||
``` | ||
![alt text](img/Docker_exec.png "Docker exec") | ||
The promp has now changed to **[[email protected] ~]$** to confirm that we are in the container. | ||
|
||
We can now, for example, check the version of the operating system inside the container (Centos-8 in this case, | ||
whereas the shell was originally Debian): | ||
We can now, for example, check the version of the operating system inside the container (it is Centos-8 in this case, | ||
whereas that was originally Debian in the Google Cloud Shell): | ||
``` | ||
cat /etc/os-release | ||
``` | ||
|