Browse Source

Ready for Talk

master
parent
commit
b3ad8a5c4e
3 changed files with 12362 additions and 3 deletions
  1. +12325
    -0
      76-0.txt
  2. +2
    -2
      Dockerfile
  3. +35
    -1
      Readme.md

+ 12325
- 0
76-0.txt
File diff suppressed because it is too large
View File


+ 2
- 2
Dockerfile View File

@ -1,10 +1,10 @@
# Ubuntu
FROM ubuntu:bionic
ENV UNAME="data-science"
ENV UNAME="data-science-workflow"
MAINTAINER gmarxcc
LABEL version="0.1"
ARG DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN apt-get update \
&& apt-get install -y python3
&& apt-get install -y python3 curl

+ 35
- 1
Readme.md View File

@ -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 ##
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 ###
**Create a basic container not image**
``` shell
docker pull gmarxcc/workflow:0.1
```
### 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:
@ -41,6 +59,15 @@ $ docker run --rm -it -v ${PWD}:/data datascienceworkshops/data-science-at-the-c
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.
### Testing the container ###
#### Command-line example ####
``` shell
curl -s http://gmarx.jumpingcrab.com/examples-data/76-0.txt | tr '[:upper:]' '[:lower:]' | grep -oE '\w+' | sort | uniq -c | sort -nr | head -n 10
```
#### Python example ####
**creating the factor operation on docker**
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 #
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*.


Loading…
Cancel
Save