<commit_before>---
date: "2017-12-22"
title: "Using Containers For Beginners"
layout: post
---

# What is a container ?

A container is just a way to achieve process isolation. Unlike virtual machines, they don’t achieve isolation by simulating hardware, but by using existing Linux kernel features.

In a typical Unix/Linux OS all processes share the same user space, but with the introduction of new features in Linux 2.6+, you can create a process that has its own particular set of isolated contexts like file tree, threads, etc. These features in combination with other kernel technologies are the magic behind containers.

In this article I will introduce basic Docker commands and concepts. After you finish reading, you will be able to adopt some Docker capabilities to accelerate and simplify your day-to-day workflow.


# Installing Docker

Installation of Docker is a simple task in OS X/Windows using the installation wizard You can find the installer for your OS on the Docker community page, On Linux, Docker is usually available in the distribution package manager.

Installing Docker in [Fedora](https://getfedora.org/es/workstation/): 

``` sh
sudo dnf install docker
```
To start the process:

```sh
sudo systemctl start docker
```

To make the Docker process start and boot time:

```sh
sudo systemctl enable docker
```

The steps should be similar in others Linux distributions that use Systemd.

# Getting Started

#### Hello World

Once you finished the installation we should try a small **Hello World!** for containers:

```sh
#sudo is only for Linux
sudo docker run --name hello -it busybox echo "Hello World!" # Hello World!
```

Using **sudo** is only necessary if you are running some Linux distributions, but keep in mind that Docker require admin rights to create the containment, in OSX and Windows at the moment of writing this article they use some Linux based virtual machine behind the scene, so Docker command can be run without privilege user.

#### How it works

```sh
sudo docker run <options> <image> <command to run inside the container> 
```

The ```run``` option creates and run a container, one of the properties is that Docker binds the life of the container to the running process (in this case the Linux command echo), which means that when process finish the container will be terminated.

- **name** we set the name of the container, if you don't choose anything Docker will choose one at random.
<commit_msg>Fixing a typop<commit_after>---
date: "2017-12-22"
title: "Using Containers For Beginners"
layout: post
---

# What is a container ?

A container is just a way to achieve process isolation. Unlike virtual machines, they don’t achieve isolation by simulating hardware, but by using existing Linux kernel features.

In a typical Unix/Linux OS all processes share the same user space, but with the introduction of new features in Linux 2.6+, you can create a process that has its own particular set of isolated contexts like file tree, threads, etc. These features in combination with other kernel technologies are the magic behind containers.

In this article I will introduce basic Docker commands and concepts. After you finish reading, you will be able to adopt some Docker capabilities to accelerate and simplify your day-to-day workflow.


# Installing Docker

Installation of Docker is a simple task in OS X/Windows using the installation wizard You can find the installer for your OS on the Docker community page, On Linux, Docker is usually available in the distribution package manager.

Installing Docker in [Fedora](https://getfedora.org/es/workstation/): 

``` sh
sudo dnf install docker
```
To start the process:

```sh
sudo systemctl start docker
```

To make the Docker process start and boot time:

```sh
sudo systemctl enable docker
```

The steps should be similar in others Linux distributions that use Systemd.

# Getting Started

#### Hello World

Once you finished the installation we should try a small **Hello World!** for containers:

```sh
#sudo is only for Linux
sudo docker run --name hello -it busybox echo "Hello World!" # Hello World!
```

Using **sudo** is only necessary if you are running some Linux distributions, but keep in mind that Docker require admin rights to create the containment, in OSX and Windows at the moment of writing this article they use some Linux based virtual machine behind the scene, so Docker command can be run without privilege user in those systems.

#### How it works

```sh
sudo docker run <options> <image> <command to run inside the container> 
```

The ```run``` option creates and run a container, one of the properties is that Docker binds the life of the container to the running process (in this case the Linux command echo), which means that when process finish the container will be terminated.

- **name** we set the name of the container, if you don't choose anything Docker will choose one at random.

{'fraction_non_alphanumeric': 0.05918119173084718, 'fraction_numerical': 0.004053506282934738, 'mean_word_length': 4.435022026431718, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '508449', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1149, 'n_words': 761}