@ -13,11 +13,29 @@ The key benefit of Docker is that it allows users to package an application with
## Installing and using a Docker image ##
## Installing and using a Docker image ##
In this case we are going to create a new Docker image to work with. The image is based on **Ubuntu Bionic:18.04** and it is created using `docker build`, by using the next `Dockerfile`:
``` shell
```
and calling the `docker build` command:
``` shell
docker build -t gmarxcc/workflow:0.1 .
```
### Docker Pull ###
### Docker Pull ###
**Create a basic container not image**
``` shell
docker pull gmarxcc/workflow:0.1
```
### Docker Run ###
### Docker Run ###
``` shell
docker run -it -v `pwd/data:/home `gmarxcc/workflow:0.1
```
We recommend that you create a new directory, navigate to this new directory, and then run the following when you’re on macOS or Linux:
We recommend that you create a new directory, navigate to this new directory, and then run the following when you’re on macOS or Linux:
In the above commands, the option `-v` instructs docker to map the current directory to the `/data` directory inside the container, so this is the place to get data in and out of the Docker container.
In the above commands, the option `-v` instructs docker to map the current directory to the `/data` directory inside the container, so this is the place to get data in and out of the Docker container.
For testing the container a factorial function is created in Python 3:
For testing the container a factorial function is created in Python 3:
@ -72,6 +99,13 @@ if __name__ == "__main__":
```
```
#### Nginx server example ####
``` shell
docker pull nginxdemos/hello
docker run -P -d nginxdemos/hello
docker ps
```
# Command line basics #
# Command line basics #
This new way to work requires an overall understanding about we should call the command line, and according to [^2] it is mainly defined by:*(i)the command-line tools, (ii)the terminal, (iii)the shell, and (iv)the operating system*.
This new way to work requires an overall understanding about we should call the command line, and according to [^2] it is mainly defined by:*(i)the command-line tools, (ii)the terminal, (iii)the shell, and (iv)the operating system*.