<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Alex Ortiz</title>
    <description>The latest articles on DEV Community by Alex Ortiz (@alexoeducative).</description>
    <link>https://dev.to/alexoeducative</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F147561%2Fa4ef8628-09ef-471f-be9c-5040900fb5f2.jpeg</url>
      <title>DEV Community: Alex Ortiz</title>
      <link>https://dev.to/alexoeducative</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexoeducative"/>
    <language>en</language>
    <item>
      <title>docker learn #07: A Tiny Post about Image Size &amp; Run Times</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Sat, 23 Nov 2019 04:24:35 +0000</pubDate>
      <link>https://dev.to/alexoeducative/docker-learn-07-a-tiny-post-about-image-size-run-times-4n91</link>
      <guid>https://dev.to/alexoeducative/docker-learn-07-a-tiny-post-about-image-size-run-times-4n91</guid>
      <description>&lt;p&gt;I have the tiniest of Docker Learn write-ups this week. 🙃&lt;/p&gt;

&lt;h1&gt;
  
  
  Alpine Builds and Runs so QUICKLY
&lt;/h1&gt;

&lt;p&gt;Suppose you try each of the following commands:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;docker run ubuntu&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docker run fedora&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docker run alpine&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;docker run golang&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first two commands install images and run super short-lived containers based on Ubuntu Linux and Fedora Linux, respectively. The third one does the same, but on Alpine Linux. By now &lt;a href="https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-02-2723"&gt;I know&lt;/a&gt; that Alpine is 10x smaller than Ubuntu, but running these commands really brought the point home about why that makes a difference.&lt;/p&gt;

&lt;p&gt;With the first two commands, it took a few seconds for the Docker daemon to download the images before it could run the container. But the third image (Alpine) downloaded so quickly that I almost didn't even notice the progress bar for it in the Docker terminal. The fourth command, on the other hand, took longer to execute than the first three combined.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;code&gt;docker images&lt;/code&gt; = &lt;code&gt;docker image ls&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;If I run &lt;code&gt;docker images&lt;/code&gt; or &lt;code&gt;docker image ls&lt;/code&gt;, both commands will output the same thing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
golang              latest              54e71dcafb7c        3 weeks ago         803MB
ubuntu              latest              775349758637        3 weeks ago         64.2MB
fedora              latest              f0858ad3febd        3 weeks ago         194MB
alpine              latest              965ea09ff2eb        4 weeks ago         5.55MB
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This is a useful command, as I can now quickly compare the four images from above, by image size. The output seems to be sorted by image creation date rather than size. But it's still easy to compare the image sizes—and it's now obvious why the &lt;code&gt;alpine&lt;/code&gt; image downloaded so quickly and the &lt;code&gt;golang&lt;/code&gt; image so slowly, relatively speaking. Alpine was just 5.55 MB in size, compared to Golang's 803 MB.&lt;/p&gt;

&lt;p&gt;By the way, &lt;code&gt;docker images ls -a&lt;/code&gt; will also output the same information. (I don't yet know under what conditions this would not be the case)&lt;/p&gt;

&lt;p&gt;And that's it! Until next week 👋🏾.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
    </item>
    <item>
      <title>docker learn #06: Hello Python in Alpine</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Sat, 16 Nov 2019 05:15:25 +0000</pubDate>
      <link>https://dev.to/alexoeducative/docker-learn-06-hello-python-in-alpine-4cl7</link>
      <guid>https://dev.to/alexoeducative/docker-learn-06-hello-python-in-alpine-4cl7</guid>
      <description>&lt;p&gt;So here I am with a full month of Docker under my belt, wondering what I can do to show myself my progress. To decide what to write about this week, let me start from scratch: what do I know?&lt;/p&gt;

&lt;p&gt;I know that to run a docker container, I need a docker image. And to build a docker image, I need a Dockerfile, which contains the files plus metadata necessary to run a self-contained environment. The environment includes an operating system and the application I wish to run. For example, if I want to run a Python3 shell inside a container as if I were running it on my local machine's terminal, then I'm going to need, at a minimum, the following environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an operating system on which to run Python3&lt;/li&gt;
&lt;li&gt;the Python3 programming language installed on the OS&lt;/li&gt;
&lt;li&gt;a command line interface to interact with Python3 in shell mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words, I need to be able to run the Python3 shell inside a terminal inside a Linux Docker container.&lt;/p&gt;

&lt;p&gt;Easy enough.&lt;/p&gt;

&lt;h1&gt;
  
  
  Installing a Base Image...but Which One?
&lt;/h1&gt;

&lt;p&gt;First up is the operating system.&lt;/p&gt;

&lt;p&gt;Python is a pretty lightweight language that just about any operating system can handle. So I want to use a super lightweight Linux distribution to serve as my operating system for this exercise. In lieu of Ubuntu, let's go with Alpine, which is 1/10th the size.&lt;/p&gt;

&lt;p&gt;If I run the following command from my Docker CLI, though, I'll run into trouble right away:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run alpine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I &lt;em&gt;won't&lt;/em&gt; want to run just this command, because if I do, then this happens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;my Docker client calls the docker daemon via the Docker API&lt;/li&gt;
&lt;li&gt;it tells the daemon that I want to run an alpine container (totally is true)&lt;/li&gt;
&lt;li&gt;the daemon will dutifully do all this stuff:

&lt;ul&gt;
&lt;li&gt;pull the alpine image from Docker Hub 💪🏾&lt;/li&gt;
&lt;li&gt;run the alpine image on my Docker server 💪🏾&lt;/li&gt;
&lt;li&gt;run an alpine container from this image 💪🏾&lt;/li&gt;
&lt;li&gt;immediately exit said container 😤&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This is because the Dockerfile for an alpine image has but one command that runs as default: &lt;code&gt;"/bin/sh"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So when I tell Docker to pull or run alpine, it does that, and the base image runs, and it does what it's supposed to, but then the shell a) doesn't receive any additional instructions, b) determines that there is nothing for it to do, and consequently c) stops running, which leaves the container without a process to run, causing the container to be terminated (exited). No process, no container. I get it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Side Note 1&lt;/strong&gt;: This can be confirmed with the &lt;code&gt;docker ps -a&lt;/code&gt; command, which will show that an alpine container did indeed momentarily run but was then exited. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is of course no good to me if what I want to do is run Python3 inside a container.&lt;/p&gt;

&lt;p&gt;So it's time to break out the useful &lt;strong&gt;-ti&lt;/strong&gt; flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using &lt;code&gt;-ti&lt;/code&gt; To Run an Interactive Terminal
&lt;/h2&gt;

&lt;p&gt;For all the above reasons, I run the following instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -ti alpine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There we go. Now the docker daemon will do its thing again, but &lt;em&gt;this&lt;/em&gt; time, the alpine container won't exit. The combo of the two Docker flags &lt;code&gt;t&lt;/code&gt; and &lt;code&gt;i&lt;/code&gt; will instruct Docker to please allocate me a terminal and patiently listen for my input.&lt;/p&gt;

&lt;p&gt;I'll now be able to use the built-in shell to move on to my next step: installing Python3 inside this container.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding Python3 with the Alpine Package Manager, apk
&lt;/h1&gt;

&lt;p&gt;Alpine Linux doesn't come with Python3 pre-installed. You have to install it manually. It's very simple to do with the alpine package manager, &lt;code&gt;apk&lt;/code&gt;. A quick check of the &lt;a href="https://pkgs.alpinelinux.org/packages?name=python3&amp;amp;branch=edge" rel="noopener noreferrer"&gt;Alpine Linux APK website&lt;/a&gt; shows that &lt;strong&gt;python3&lt;/strong&gt; is indeed one of the packages.&lt;/p&gt;

&lt;p&gt;Since I'm now running an Alpine Linux docker container with an interactive terminal waiting for me to provide further instruction, I can proceed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apk add python3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install python3 on my alpine operating system inside the Docker container. I can confirm the installation afterwards by typing &lt;code&gt;python3 --version&lt;/code&gt; into the alpine terminal, which outputs &lt;code&gt;Python 3.7.5&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/ # python3 --version
Python 3.7.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We're in business! On to the final step: launching Python3 in shell mode.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Side Note 2&lt;/strong&gt;: By the way, the presence of &lt;code&gt;/ #&lt;/code&gt; indicates that I'm in the interactive shell terminal within my alpine container.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Actually Running Python3 in Shell Mode
&lt;/h1&gt;

&lt;p&gt;At last, I can run Python3. Since I just installed python3, I can simply run it by typing &lt;code&gt;python3&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/ # python3
Python 3.7.5 (default, Oct 17 2019, 12:25:15) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
&amp;gt;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The presence of &lt;code&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/code&gt; indicates that I'm in Python3's shell mode. That is, I am now actually running the Python3 application. Now for the fun stuff! 😎&lt;/p&gt;

&lt;h1&gt;
  
  
  Taking on a Small Python Challenge
&lt;/h1&gt;

&lt;p&gt;Now that I have Python running in shell mode inside an interactive shell terminal inside an Alpine Docker container, I can take on a fun challenge. For example, my Educative team &lt;a href="https://www.educative.io/blog/level-up-python-skills" rel="noopener noreferrer"&gt;recently wrote a blog post&lt;/a&gt; with six fun Python challenges.&lt;/p&gt;

&lt;p&gt;Let's try two of them right now :).&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenge #1: World, Can You Hear Me?
&lt;/h2&gt;

&lt;p&gt;Here was my team's prompt to readers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbgfwmjnq5eu1x9bnjjfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbgfwmjnq5eu1x9bnjjfa.png" alt="Challenge #1 from Level up your Python skills with these 6 challenges"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Challenge accepted. In my Docker container, I type this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; print("Hello World\nLet's Learn Python\nSincerely, Alex")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the Python shell prints the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World
Let's Learn Python
Sincerely, Alex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Challenge #2: Some Maths and Physics
&lt;/h2&gt;

&lt;p&gt;Here was my team's prompt to readers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5k5o4m5r1uzuef68xen9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5k5o4m5r1uzuef68xen9.png" alt="Challenge #2 from Level up your Python skills with these 6 challenges"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They also provided the following values:&lt;/p&gt;

&lt;p&gt;G = 6.67 x 10^&lt;sup&gt;-11&lt;/sup&gt;&lt;br&gt;
MSun = 2.0 x 10&lt;sup&gt;30&lt;/sup&gt;&lt;br&gt;
mEarth = 6.0 x 10&lt;sup&gt;24&lt;/sup&gt;&lt;br&gt;
r = 1.5 x 10&lt;sup&gt;11&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;So in my Docker container, I created variables &lt;code&gt;G&lt;/code&gt;, &lt;code&gt;M&lt;/code&gt;, &lt;code&gt;m&lt;/code&gt;, and &lt;code&gt;r&lt;/code&gt; and stored their respective values in each, using Python-friendly scientific notation. Then I created the variable &lt;code&gt;grav_force&lt;/code&gt; as instructed, though converting it into the Python-friendly notation. Finally, I instructed Python to print the variable I just created, outputting the result of Newton's beautiful gravitational force equation.&lt;/p&gt;

&lt;p&gt;Putting this all together, it was like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; G = 6.67e-11
&amp;gt;&amp;gt;&amp;gt; M = 2.0e30
&amp;gt;&amp;gt;&amp;gt; m = 6.0e24
&amp;gt;&amp;gt;&amp;gt; r = 1.5e11
&amp;gt;&amp;gt;&amp;gt; grav_force = (G*M*m)/(r*r)
&amp;gt;&amp;gt;&amp;gt; print(grav_force)
3.5573333333333336e+22
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Close enough, and not bad for this all running inside a Docker container! :)&lt;/p&gt;

&lt;p&gt;I then type &lt;code&gt;(exit)&lt;/code&gt; to exit the Python3 shell, and then &lt;code&gt;exit&lt;/code&gt; to exit the alpine container I've been using. To confirm that the daemon terminated the container, I use &lt;code&gt;docker ps -a -l&lt;/code&gt;, and it shows me that the last container that ran indeed was exited, seconds ago.&lt;/p&gt;

&lt;h1&gt;
  
  
  Wrapping Up
&lt;/h1&gt;

&lt;p&gt;I've once again run out of time to write all the other cool stuff I learned this week or am excited about with respect to Docker. But I'm really happy that I got to "test" myself by starting from what I've learned so far and then moving towards a tangible demonstration of my learnings—even crossing over into Python-land.&lt;/p&gt;

&lt;p&gt;And did I mention how sweet it is that we just saw how easy and cool it is to run Python-in-Linux-in-Docker?&lt;/p&gt;

&lt;p&gt;Very cool indeed. Till next time!&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1195572759645917184-502" src="https://platform.twitter.com/embed/Tweet.html?id=1195572759645917184"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1195572759645917184-502');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1195572759645917184&amp;amp;theme=dark"
  }



 &lt;/p&gt;




&lt;p&gt;You know the drill: hit the DEV.to Follow button, follow me on Twitter &lt;a href="https://twitter.com/alexoeducative" rel="noopener noreferrer"&gt;@alexoeducative&lt;/a&gt;, and definitely visit &lt;a href="//Educative.io/blog"&gt;our blog&lt;/a&gt;. Chat or comment below if you'd like to add any Alpine or Docker knowledge!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
    </item>
    <item>
      <title>docker learn #05: An Interesting --Help Quest</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Sat, 09 Nov 2019 00:39:21 +0000</pubDate>
      <link>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-05-2pig</link>
      <guid>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-05-2pig</guid>
      <description>&lt;p&gt;This week, I wanted to poke around the Docker command line interface (CLI) to see how it can help me troubleshoot something or accomplish a goal. A few weeks ago as I was reading the very awesome book &lt;em&gt;Docker Up &amp;amp; Running: Shipping Reliable Containers in Production&lt;/em&gt; by Sean P. Kane and Karl Matthias, I scribbled down a note next to a command. The scribble was, "&lt;em&gt;What does --rm do?&lt;/em&gt;".&lt;/p&gt;

&lt;h1&gt;
  
  
  What does &lt;code&gt;--rm&lt;/code&gt; do?
&lt;/h1&gt;

&lt;p&gt;If you've already created a docker container and you want to manually remove it from your host, you can use the command &lt;code&gt;docker rm &amp;lt;containername&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But if what you want to do is use a single command to instruct the docker daemon to do three things—&lt;/p&gt;

&lt;p&gt;1) pull an image,&lt;br&gt;
2) create and run a container from that image, AND&lt;br&gt;
3) remove the container right after&lt;/p&gt;

&lt;p&gt;—then you can use &lt;code&gt;docker run --rm&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Last week, I ran &lt;code&gt;docker run ubuntu&lt;/code&gt;, which pulled the &lt;code&gt;ubuntu:latest&lt;/code&gt; image, ran an instance (container) of that image with the command &lt;code&gt;/bin/bash&lt;/code&gt;, and exited the container afterwards. Recall that this happens because Ubuntu is not an application or process but rather a base operating system image, so by design the ensuing container doesn't have any process running inside and is therefore terminated fractions of a second after it runs. But we were still able to double-check that the container indeed ran by typing &lt;code&gt;docker ps -a&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, let's see what happens if we use an alternative command with the &lt;strong&gt;--rm option&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run --rm ubuntu
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;What does this do? Let's find out by using Docker's insanely helpful &lt;strong&gt;--help&lt;/strong&gt; option in the CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to gladly ask for &lt;code&gt;--help&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If we type &lt;code&gt;docker run --help&lt;/code&gt;, the inline Docker manual tells us that the &lt;code&gt;--rm&lt;/code&gt; flag will "&lt;em&gt;automatically remove the container when it exits&lt;/em&gt;".&lt;/p&gt;

&lt;p&gt;We can check for this because neither &lt;code&gt;docker ps&lt;/code&gt; nor &lt;code&gt;docker ps -a&lt;/code&gt; will list any container. But this begs the question: how can we tell the difference between "never having run any containers" and "having run containers that have since been deleted (or automatically removed)"?&lt;/p&gt;

&lt;p&gt;Let's see if &lt;code&gt;docker --help&lt;/code&gt; can give us such clues.&lt;/p&gt;

&lt;p&gt;First, try running &lt;code&gt;docker --help&lt;/code&gt; in your CLI. That will print the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker --help

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options:
      --config string      Location of client config files (default "/root/.docker")
  -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and
                           default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default "/root/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default "/root/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default "/root/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit

Management Commands:
  app*        Docker Application (Docker Inc., v0.8.0)
  builder     Manage builds
  checkpoint  Manage checkpoints
  config      Manage Docker configs
  container   Manage containers
  context     Manage contexts
  engine      Manage the docker engine
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  node        Manage Swarm nodes
  plugin      Manage plugins
  secret      Manage Docker secrets
  service     Manage services
  stack       Manage Docker stacks
  swarm       Manage Swarm
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  build       Build an image from a Dockerfile
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  deploy      Deploy a new stack or update an existing stack
  diff        Inspect changes to files or directories on a container's filesystem
  events      Get real time events from the server
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  images      List images
  import      Import the contents from a tarball to create a filesystem image
  info        Display system-wide information
  inspect     Return low-level information on Docker objects
  kill        Kill one or more running containers
  load        Load an image from a tar archive or STDIN
  login       Log in to a Docker registry
  logout      Log out from a Docker registry
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  ps          List containers
  pull        Pull an image or a repository from a registry
  push        Push an image or a repository to a registry
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  run         Run a command in a new container
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  search      Search the Docker Hub for images
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  version     Show the Docker version information
  wait        Block until one or more containers stop, then print their exit codes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Our goal is to figure out if there's a command in Docker that will show us a historical record of any containers that we previously ran, even if they were eventually deleted. So what we want to do is look for clues in the &lt;code&gt;--help&lt;/code&gt; printout as to which command may help us display such a record.&lt;/p&gt;

&lt;p&gt;Unfortunately for us, none of the &lt;strong&gt;Options&lt;/strong&gt; in the list seem relevant to this quest. But in the &lt;strong&gt;Management Commands&lt;/strong&gt; section, &lt;code&gt;container&lt;/code&gt; looks promising.&lt;/p&gt;

&lt;p&gt;So let's run &lt;code&gt;docker container --help&lt;/code&gt; to drill down on what the &lt;code&gt;container&lt;/code&gt; command does. Here's the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker container --help

Usage:  docker container COMMAND

Manage containers

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  diff        Inspect changes to files or directories on a container's filesystem
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  inspect     Display detailed information on one or more containers
  kill        Kill one or more running containers
  logs        Fetch the logs of a container
  ls          List containers
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  prune       Remove all stopped containers
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  run         Run a command in a new container
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  wait        Block until one or more containers stop, then print their exit codes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Ah! The &lt;code&gt;container&lt;/code&gt; command is used to manage containers, which we can do by using all the commands listed just above. Among them, the &lt;code&gt;inspect&lt;/code&gt; and &lt;code&gt;logs&lt;/code&gt; commands initially appear to have potential. Sadly, they won't help either: we don't actually know the name or container ID of a container to refer these commands to. Alone, &lt;code&gt;docker container inspect&lt;/code&gt; and &lt;code&gt;docker container logs&lt;/code&gt; won't actually turn up anything. Neither will &lt;code&gt;docker container ls&lt;/code&gt;, since there are no containers running.&lt;/p&gt;

&lt;p&gt;In the main list of commands above, I discovered a command I hadn't used before: &lt;code&gt;docker info&lt;/code&gt;. In addition to running &lt;code&gt;docker ps -a&lt;/code&gt;, we can use &lt;code&gt;docker info&lt;/code&gt; to confirm that no containers are running. It will list, among much else, the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker info

[...]

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 1

[...]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So yea. We have one image (i.e., ubuntu:latest) running, but zero containers. With zero containers running, and no containers that ran but have not yet been deleted, we can't retrieve a container ID, which is necessary to use the &lt;code&gt;inspect&lt;/code&gt; or &lt;code&gt;logs&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;We are at a dead end.&lt;/p&gt;

&lt;h1&gt;
  
  
  Where to, From Here?
&lt;/h1&gt;

&lt;p&gt;What we need is a list of activity that will display the container ID of the container that was created and exited when we first ran &lt;code&gt;docker run --rm ubuntu&lt;/code&gt; above. However, none of the commands explored above, or found through the &lt;strong&gt;--help&lt;/strong&gt; option, seem to do that.&lt;/p&gt;

&lt;p&gt;At this point, one has to wonder if our assumption is even correct: does Docker even keep a log of containers that ran in the past (or during the current session) but no longer exist? On the one hand, this would be useful, to be able to distinguish "containers that happened" yet are no longer visible from "containers that never happened". If the daemon doesn't know the difference, then neither can we.&lt;/p&gt;

&lt;p&gt;Being at this impasse, if I Google, "&lt;em&gt;how to list the last docker container that ran&lt;/em&gt;", I only find two things that offer clues as to possible next steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Some folks who wished to &lt;a href="https://stackoverflow.com/questions/29202787/restore-deleted-container-docker"&gt;restore an accidentally deleted container&lt;/a&gt; have been able to do so by navigating to the directory &lt;code&gt;/var/lib/docker/volumes/&amp;lt;containerIDfolder&amp;gt;/_data&lt;/code&gt;. I don't know how to do that yet, though.&lt;/li&gt;
&lt;li&gt;Docker's documentation &lt;a href="https://docs.docker.com/v17.09/engine/userguide/storagedriver/imagesandcontainers/#data-volumes-and-the-storage-driver"&gt;describes&lt;/a&gt; the interplay between the local storage area of a running container and the &lt;code&gt;/data&lt;/code&gt; directory on a Docker host&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But alas, we are once again out of time for this week's post. This has been a great way to get to know the Docker CLI and how to leverage &lt;code&gt;docker --help&lt;/code&gt; to quickly read the manual when attempting to solve a basic problem.&lt;/p&gt;

&lt;p&gt;Great learning exercise! :)&lt;/p&gt;

&lt;h1&gt;
  
  
  This Week's Docker Answer Roundup
&lt;/h1&gt;

&lt;p&gt;I'm back on my Q&amp;amp;A grind. Here are a few questions I answered this week.&lt;/p&gt;

&lt;h3&gt;
  
  
  On deploying AI models using containers
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: How can I deploy AI models using Kubernetes?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/How-can-I-deploy-AI-models-using-Kubernetes/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;For this question, you might find inspiration in some of the work being done to run ML models as microservices using a combination of &lt;strong&gt;Python&lt;/strong&gt;, &lt;strong&gt;Flask&lt;/strong&gt;, &lt;strong&gt;Docker&lt;/strong&gt;, IBM’s Data Asset Exchange (&lt;strong&gt;DAX&lt;/strong&gt;) network for open source data sets, IBM’s Model Asset Exchange (&lt;strong&gt;MAX&lt;/strong&gt;) for open source deep learning models, and cloud-based Functions-as-a-Service (FaaS) platforms such as IBM’s own &lt;strong&gt;OpenWhisk&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What Docker does in this context is provide the containers and container runtime engine within which to perform certain aspects of training and using your models. If you have a need to run multiple, interacting containers, you might then use a container orchestrator such as &lt;strong&gt;Kubernetes&lt;/strong&gt;. But the details will vary by your use case.&lt;/p&gt;

&lt;p&gt;(The reason I say &lt;em&gt;inspiration&lt;/em&gt; above is that there may be other approaches to doing something similar for what you want. Whereas the IBM approach is obviously targeted at enterprise uses of AI models, perhaps what you have in mind isn’t aimed at enterprise use cases. Nonetheless, the approach may offer you clues as to how you can go about doing what you’d like to do with containers).&lt;/p&gt;

&lt;p&gt;Check out the following resources to see if there’s something helpful there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.ibm.com/tutorials/leverage-deep-learning-in-apache-openwhisk-ibm-cloud-functions/"&gt;Leverage deep learning in IBM Cloud Functions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.ibm.com/exchanges/data/"&gt;IBM Data Asset eXchange&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.ibm.com/exchanges/models/"&gt;IBM Model Asset eXchange&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.siliconvalley-codecamp.com/presenter/2019/saishruthi-swaminathan-46861"&gt;Deploy deep learning models as a web microservice in minutes - Silicon Valley Code Camp (October 19-20 2019)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here’s the recording of the presentation in the last link above (the lecture slides are in the comments of the video - see “&lt;strong&gt;Session Materials&lt;/strong&gt;”):&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/iEGd3EQIFYw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  On using multiple containers for a web app
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: Would you put the frontend and the backend of a web app in different docker containers?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/Would-you-put-the-frontend-and-the-backend-of-a-web-app-in-different-docker-containers/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Ideally and in many scenarios, yes. One of the software design practices that Docker is suited to (and subtly enforces) is the isolation of processes in an application stack. This helps with long-term scalability, especially if you anticipate your app being used in a way that requires running thousands of containers or more. Since a Docker container is a single, short-lived instance of a single task, process, or application, then it might make more sense to separate the front-end component from the back-end one(s). For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NodeJS&lt;/strong&gt; in one container, with a &lt;strong&gt;MySQL&lt;/strong&gt; database in another&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PHP&lt;/strong&gt; running in one container, &lt;strong&gt;nginx&lt;/strong&gt; running in a second container, and &lt;strong&gt;MariaDB&lt;/strong&gt; running in a third&lt;/li&gt;
&lt;li&gt;A container with your front-end, another container with a cache service like &lt;strong&gt;Redis&lt;/strong&gt;, and a database like &lt;strong&gt;MongoDB&lt;/strong&gt; or &lt;strong&gt;CouchDB&lt;/strong&gt; in yet another&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In all of these scenarios involving multiple containers that are all necessary for your app to work, you’ll likely need a container orchestrator such as Docker Compose, Mesos, or Kubernetes.&lt;br&gt;
Hope that helps.&lt;/p&gt;

&lt;h3&gt;
  
  
  On the future of container virtualization
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: Do you see Windows containers as the next step in the evolution in virtualization or is it something that may fade away?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/Do-you-see-Windows-containers-as-the-next-step-in-the-evolution-in-virtualization-or-is-it-something-that-may-fade-away/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;I’ll answer this more generally. With technology, it’s so hard to make predictions. Sure bets don’t always work out, and relative unknowns can become dominant forces over time. Within the span of 24–36 months, certain technologies and products can go from low adoption rates to rapid growth and eventually scale. So looking at the current state doesn’t help us much in anticipating the future; nobody can say for certain if Windows containers or Windows container runtime engines will or won’t experience rapid adoption in the future or become the go-to technology for OS-level virtualization. Just because something like 99% of the container ecosystem today is Linux-based doesn’t mean that this can’t change.&lt;/p&gt;

&lt;p&gt;However, from what I’ve learned about containers and the container ecosystem—and I’m still at the very early stages of my learning—a few things are worth noting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Technologies that experience rapid adoption usually benefit from a lot of work that came before it. This is true in every tech space, but here are two examples involving containers.

&lt;ul&gt;
&lt;li&gt;Docker has been a very successful container runtime engine, but its success came after lot of work by a lot of companies had been done on Linux kernels and containers. Perhaps there is foundational work being done today on Windows containers and Windows container runtime engines that isn’t visible to the mainstream but that will someday be looked upon as an example of why Windows containers became wildly successful.&lt;/li&gt;
&lt;li&gt;Kubernetes has gained immense popularity as a Linux container orchestrator, but Google was working on Kubernetes for many years and was running millions of containers with it before it open-sourced the project. Years later (today), Kubernetes seems like &lt;strong&gt;the&lt;/strong&gt; container orchestrator. But perhaps Titus (Netflix’s orchestrator) will be the go-to orchestrator for tomorrow. Who’s to say that an orchestrator natively based on Windows containers won’t become the Kubernetes or Titus of tomorrow?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Communities and network effects are wonderful, interesting drivers of product adoption. For instance, Facebook launched in 2004. It’s just &lt;em&gt;fifteen years old&lt;/em&gt;. In a mere five 36-month timespans, it’s become the #6 most valuable company in the world and one of the most valuable companies of all time. It became that valuable this quickly due to its rapid adoption, the nature of networks and communities, and other just-in-time factors such as a rise in mobile phones, the reduced cost of telecommunications infrastructure, and new trends in how we consume media

&lt;ul&gt;
&lt;li&gt;By analogy, Docker and Kubernetes have enjoyed relatively rapid adoption cycles within their user communities. This is in part because Docker and Kubernetes solved a problem for a large addressable market of developers, engineers, and businesses. It’s likely also the case that these two technologies have benefited from good timing, emerging at a time when variables external to them have nevertheless positively impacted their adoption curves. If Windows container and container runtime tools emerge under analogous circumstances, then who knows what will happen&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In summary, it isn’t inconceivable to imagine that in the next 5–10 years, a useful Windows container technology could emerge just as the market is ready for it. I’m not saying that it will happen, but I’m saying that it’s unrealistic to think that it can’t. Businesses tend to respond to the behaviors and expectations of their consumers. Technologies tend towards addressing the needs and requirements that arise because of this. So the evolution of containers—be that with respect to Linux, Windows, or anything else—will likely be influenced by the interplay between these two factors.&lt;/p&gt;

&lt;h3&gt;
  
  
  On image registries
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: Where does Kubernetes pull images from?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/Where-does-Kubernetes-pull-images-from/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Since Kubernetes is a container orchestrator and containers are built from container images (such as a &lt;strong&gt;Docker image&lt;/strong&gt;), the images pulled by Kubernetes are also stored in a public or private container image registry. The technical documentation for Kubernetes &lt;a href="https://kubernetes.io/docs/concepts/containers/images/"&gt;says&lt;/a&gt; that you “can create your Docker image and push it to a registry before referring to it in a Kubernetes pod”.&lt;/p&gt;

&lt;p&gt;Examples of image registries include &lt;a href="https://hub.docker.com/"&gt;Docker Hub&lt;/a&gt;, &lt;a href="https://docs.docker.com/registry/"&gt;Docker Registry&lt;/a&gt;, &lt;a href="https://docs.docker.com/ee/dtr/"&gt;Docker Trusted Registry (DTR)&lt;/a&gt; for enterprise, &lt;a href="https://cloud.google.com/container-registry/"&gt;Google Container Registry&lt;/a&gt;, &lt;a href="https://aws.amazon.com/ecr/"&gt;Amazon Elastic Container Registry (Amazon ECR)&lt;/a&gt;, and many others. These all work with Kubernetes, so you can refer your images to your Kubernetes pods accordingly, pulling from a &lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/"&gt;private registry if necessary&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  On &lt;code&gt;docker push&lt;/code&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: How do I push an image to Docker Hub?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/How-do-I-push-an-image-to-Docker-Hub/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;This is typically accomplished from the Docker client with the following command: &lt;code&gt;docker push&lt;/code&gt;. What this command does, per &lt;a href="https://docs.docker.com/engine/reference/commandline/push/"&gt;Docker’s technical documentation&lt;/a&gt;, is to “push an image or a repository to a registry”. You can push an image to a public image repository such as Docker Hub, or to a private registry (see &lt;a href="https://www.quora.com/Where-does-Kubernetes-pull-images-from/answer/Alex-Ortiz-308"&gt;here&lt;/a&gt; for another answer of mine which references several public and private image repos).&lt;/p&gt;

&lt;h3&gt;
  
  
  On whether or not programmers should learn about orchestrators
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: If you work in programming, should you learn Kubernetes?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/If-you-work-in-programming-should-you-learn-Kubernetes/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;This really depends on what you’d like to accomplish and if your programming work will require deploying containerized applications. If that’s the case, then &lt;a href="https://www.educative.io/courses/docker-for-developers"&gt;learning about Docker&lt;/a&gt; may be a good investment of time, as that’s by far the most popular container runtime engine today. Docker is also heavily architected into Kubernetes. However, working with &lt;strong&gt;Kubernetes&lt;/strong&gt; is a highly specialized skill and will likely take time to learn. If you do go in that direction, consider &lt;a href="https://www.educative.io/courses/practical-guide-to-kubernetes"&gt;this resource&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I do hear that being able to debug and test your code in production with containers is a valuable skill to master, so if you plan to use Linux containers as part of your application stacks, then investing in learning Docker is likely a great idea.&lt;/p&gt;

&lt;h1&gt;
  
  
  Helpful Resources
&lt;/h1&gt;

&lt;p&gt;These may be of service to you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I must say, one of the best Docker presentations I've seen thus far is Jerome Petazzoni's 2015 talk, &lt;a href="https://www.youtube.com/watch?v=sK5i-N34im8"&gt;&lt;em&gt;Cgroups, namespaces, and beyond: what are containers made from?&lt;/em&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;I've also started watching a much longer talk of Jerome's, his three-hour &lt;a href="https://www.youtube.com/watch?v=ZVaRK10HBjo"&gt;&lt;em&gt;Introduction to Docker and Containers&lt;/em&gt;&lt;/a&gt; from PyCon 2016. It's accompanied by an INSANE resource at &lt;a href="https://container.training"&gt;https://container.training/&lt;/a&gt;, with videos, previous workshops and presentations, and lecture slides for self-paced review. Enjoy!&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;And that about does it for this week's &lt;code&gt;docker learn&lt;/code&gt;. Thanks for spending some of your time with me, my learning, and my series! Have an awesome weekend, everyone!&lt;/p&gt;

&lt;h1&gt;
  
  
  docker shoutout
&lt;/h1&gt;

&lt;p&gt;My Educative team runs a &lt;a href="https://www.educative.io/blog"&gt;pretty awesome blog&lt;/a&gt;. Not only do we interview amazing Educative Authors like C# legend &lt;a href="https://www.educative.io/blog/building-dev-tools-and-designing-c-sharp-interview-eric-lippert"&gt;Eric Lippert&lt;/a&gt;, but also sometimes we have guest blog posts on topics that—you guessed it—relate to container technologies. Two of our guest articles have been by Microsoft Developer Advocate and Docker Captain &lt;a href="https://twitter.com/scottcoulton"&gt;Scott Coulton&lt;/a&gt;. The two pieces are about Kubernetes, and since this week I answered a few K8s-related Docker questions, go ahead and also read Scott's Educative posts if you so fancy 😎👉🏾: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.educative.io/blog/deploying-my-first-service-on-kubernetes-demystifying-ingress"&gt;Deploying my first service on Kubernetes: Demystifying ingress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.educative.io/blog/pods-services-deployments"&gt;Pods, services, deployments... what do I use when?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hit the heart button, share this DEV article with someone you care about, and see ya soon! &amp;lt;3&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
    </item>
    <item>
      <title>docker learn #04: Hanging Out with Ubuntu</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Sat, 02 Nov 2019 04:38:24 +0000</pubDate>
      <link>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-04-383e</link>
      <guid>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-04-383e</guid>
      <description>&lt;p&gt;Sometimes, the best way to practice is to, well, practice. For this week's learning snapshot, I'm going to share what it's like to use a few basic commands in Docker. Let's use Ubuntu, one of the most popular Linux distributions out there, to very temporarily run a container. And let's see how to check that we've done so.&lt;/p&gt;

&lt;h1&gt;
  
  
  Hanging Out with Ubuntu
&lt;/h1&gt;

&lt;p&gt;Ubuntu is an operating system in the Debian family, as opposed to, for instance, Fedora. For practice, let's use Docker to run a Linux container on the Ubuntu operating system.&lt;/p&gt;

&lt;p&gt;Say you run this command in Docker for the first time from your Docker client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run ubuntu
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Your client will pass the &lt;code&gt;run&lt;/code&gt; instruction to the docker daemon (the server that hosts the Docker Engine, which is the runtime on which containers run).&lt;/p&gt;

&lt;p&gt;First, the daemon will try to find the ubuntu image locally: it will check to see if the image is already on the server itself. If the daemon doesn't find the image—and it won't in this case, because this is the first time you've tried to run an ubuntu container—then it will display a series of messages on your Docker command line interface (CLI) as it does each of the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;display a message confirming it did not find the image locally&lt;/li&gt;
&lt;li&gt;pull the image from the Docker registry where the image is stored, defaulting to the image with the &lt;code&gt;latest&lt;/code&gt; tag&lt;/li&gt;
&lt;li&gt;show statuses, one per line, as it downloads each of the image layers associated with the ubuntu image—in this case, the &lt;code&gt;ubuntu:latest&lt;/code&gt; image had four layers. As each layer succeeded, the CLI displayed a message that contained a short version of the SHA256 hash for that layer, along with the words "&lt;em&gt;Pull complete&lt;/em&gt;"&lt;/li&gt;
&lt;li&gt;display the full SHA256 digest for the ubuntu image in question&lt;/li&gt;
&lt;li&gt;show a confirmation message, &lt;em&gt;Status: Downloaded newer image for ubuntu:latest&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So for example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sSWU3Do8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/a785bh2qi85f2kiqjjf7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sSWU3Do8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/a785bh2qi85f2kiqjjf7.png" alt="Example of Docker CLI Messages on Docker Run"&gt;&lt;/a&gt;&lt;em&gt;From &lt;a href="https://labs.play-with-docker.com/"&gt;Docker Playground&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Great! So now we have our Ubuntu image on our Docker host, and we've actually run a Linux container based on Ubuntu. You can verify this by typing &lt;code&gt;docker ps&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uh-oh: Where's that Container?
&lt;/h2&gt;

&lt;p&gt;But wait! You won't see anything listed. As I mentioned in &lt;a href="https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-03-8jl"&gt;my last post&lt;/a&gt;, certain containers, such as containers based on base operating system images, are exited almost immediately after they run. This is because if a container doesn't have a running process (the whole point of a container), it will be exited. And in the case of an Ubuntu container that's not doing anything special, its Bash shell will run for a split second, then not see any script to run in that shell, and therefore exit. Then the container will have nothing to do, so the daemon will stop the container.&lt;/p&gt;

&lt;p&gt;(&lt;strong&gt;Sidebar&lt;/strong&gt;: If you're wondering what I'm on about, remember that every docker image is created from a &lt;strong&gt;Dockerfile&lt;/strong&gt;, which has one or more lines of instructions in it. Each line in a Dockerfile is used to create one layer, and all those layers collectively make up the actual docker image. From those four status messages I mentioned up above, we can deduce that the Dockerfile used to create the particular Ubuntu image we are now using had four lines, and thus four layers, in total—one of which is for the command &lt;code&gt;/bin/bash&lt;/code&gt;. See below.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Ah, There it Is
&lt;/h2&gt;

&lt;p&gt;You can confirm that all this happened by running the command &lt;code&gt;docker ps -a&lt;/code&gt;, whereupon your CLI will show you the following information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Container ID&lt;/li&gt;
&lt;li&gt;the docker image the container was based on&lt;/li&gt;
&lt;li&gt;a command if one was executed in the container ("/bin/bash", in this case)&lt;/li&gt;
&lt;li&gt;when said container was created&lt;/li&gt;
&lt;li&gt;the Status of the container, along with an exit code (like "0", which means "no errors"&lt;/li&gt;
&lt;li&gt;a randomly generated but usually whimsical Name for the container (e.g., "youthful_galileo")&lt;/li&gt;
&lt;li&gt;some other etceteras&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                      PORTS               NAMES
blahblahblah        ubuntu              "/bin/bash"         21 minutes ago      Exited (0) 21 minutes ago                       youthful_galileo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And there you have it. We've met our goals of running an Ubuntu Linux container using Docker and checking that we indeed ran it.&lt;/p&gt;

&lt;p&gt;From here, there's tons more that we could do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;docker start &amp;lt;containername&amp;gt;&lt;/code&gt; to restart the exited container&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;docker inspect &amp;lt;containername&amp;gt;&lt;/code&gt; to get loads of detailed information about the container&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;docker rm &amp;lt;containername&amp;gt;&lt;/code&gt; to remove the container from the host&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;docker rmi ubuntu&lt;/code&gt; to remove the Ubuntu image itself from the host, in preparation for other cool commands&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We might use &lt;code&gt;docker pull ubuntu&lt;/code&gt; to pull the Ubuntu image to our daemon, but not create a container from it just yet. Or we could use &lt;code&gt;docker create ubuntu&lt;/code&gt; to both pull the Ubuntu image &lt;em&gt;and&lt;/em&gt; create a container but &lt;em&gt;not yet&lt;/em&gt; run it. Or we could go all in with &lt;code&gt;docker create --name="cool_fridaynight" ubuntu&lt;/code&gt; to do everything we just did plus give the container a cool custom name. 😎&lt;/p&gt;

&lt;p&gt;But alas, we're out of time this week. Till next time!&lt;/p&gt;




&lt;h1&gt;
  
  
  docker shoutout
&lt;/h1&gt;

&lt;p&gt;There's a joy to learning new things, and I hope you're enjoying these writings. So if you like my series, hit the follow button and share the link with one other person. Show some &amp;lt;3 or a 🦄. And follow &lt;a href="https://dev.to/educativeinc"&gt;my Educative team&lt;/a&gt; here on Dev.to. Speaking of which, I'd like to plug a very special announcement:&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_B7kyaxJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/EIPMg6cXsAA0WoB.jpg" alt="unknown tweet media content"&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--cWF6EYrH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1119086131557978113/jNFQXlzN_normal.jpg" alt="Alex Ortiz profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Alex Ortiz
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        &lt;a class="comment-mentioned-user" href="https://dev.to/alexoeducative"&gt;@alexoeducative&lt;/a&gt;

      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      This is supremely cool 😎! We've partnered with @GitHub's &lt;a href="https://twitter.com/GitHubEducation"&gt;@GitHubEducation&lt;/a&gt; to offer 1M+ students free access to six months of &lt;a href="https://twitter.com/EducativeInc"&gt;@EducativeInc&lt;/a&gt; courses! The GitHub Student Developer Pack now includes 60+ of our amazing software development courses &lt;a href="https://t.co/tLMRoexoG7"&gt;educative.io/github-students&lt;/a&gt; 💪🏾🎉💻🎓 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      21:35 PM - 31 Oct 2019
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1190019597560373248" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1190019597560373248" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      10
      &lt;a href="https://twitter.com/intent/like?tweet_id=1190019597560373248" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      31
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;💪🏾🎓&lt;/p&gt;

&lt;p&gt;See you next week! Happy learning.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
    </item>
    <item>
      <title>docker learn #03: Learnings from Silicon Valley</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Sat, 26 Oct 2019 00:13:07 +0000</pubDate>
      <link>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-03-8jl</link>
      <guid>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-03-8jl</guid>
      <description>&lt;p&gt;I went to Silicon Valley last weekend for the Silicon Valley Code Camp SVCC 2019, held at PayPal's global headquarters. Here's me looking mesmerized at one of the many very awesome talks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0q2ybpbjlem7kkiubmrz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0q2ybpbjlem7kkiubmrz.jpg" alt="Me at SVCC"&gt;&lt;/a&gt;&lt;em&gt;From "Silicon Valley Code Camp Saturday" by Peter Kellner&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As you can imagine, at a conference full of topics related to software development, engineering, operations, security, and cloud architecture, Docker came up quite a bit, so I learned a lot because of it 🎉. Here's some of what I learned on this awesome work trip.&lt;/p&gt;

&lt;h1&gt;
  
  
  Everything I Learned about Docker in Silicon Valley Last Weekend
&lt;/h1&gt;

&lt;p&gt;First, here were the sessions I attended. Where Docker came up, I've tagged it with &lt;code&gt;docker&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/knowing-linux-and-docker-security-for-kubernetes-security" rel="noopener noreferrer"&gt;Knowing Linux and Docker Security for Kubernetes Security&lt;/a&gt; by Sunil Sabat &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/deploy-deep-learning-models-as-a-web-microservice-in-minutes" rel="noopener noreferrer"&gt;Deploy deep learning models as a web microservice in minutes&lt;/a&gt; by Shruthi Swaminathan &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/getting-started-with-the-go-programming-language-golang" rel="noopener noreferrer"&gt;Getting Started with The Go Programming Language ( golang )&lt;/a&gt; by Todd McLeod &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/introduction-to-kubernetes-and-openshift" rel="noopener noreferrer"&gt;Introduction to Kubernetes and OpenShift&lt;/a&gt; by Dave Nugent &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/acid-transactions-with-mongodb" rel="noopener noreferrer"&gt;ACID Transactions with MongoDB&lt;/a&gt; by Nuri Halperin&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/powering-designops-at-paypal" rel="noopener noreferrer"&gt;Powering DesignOps at PayPal&lt;/a&gt; by Stan Carrico&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/how-humans-learn-and-why-it-matters" rel="noopener noreferrer"&gt;How Humans Learn and Why It Matters&lt;/a&gt; by Ted Young&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/serverless-swift---for-effective-backend-as-a-service" rel="noopener noreferrer"&gt;Serverless Swift - for Effective Backend as a Service&lt;/a&gt; by Marek Sadowski &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/serverless-containers---a-match-made-in-heaven" rel="noopener noreferrer"&gt;Serverless containers - a match made in heaven&lt;/a&gt; by Martin Omander &lt;code&gt;docker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/building-reliable-and-resilient-services" rel="noopener noreferrer"&gt;Building Reliable and Resilient Services&lt;/a&gt; by Manoj Agarwal&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.siliconvalley-codecamp.com/Session/2019/master-dynamic-programming" rel="noopener noreferrer"&gt;Master Dynamic Programming&lt;/a&gt; by Hien Luu&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And now for some insights! The stuff below isn't sorted by importance or by the lecture I learned or heard it in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Container Adoption Skyrocketed in the Last Three Years; May Double in the Next Three
&lt;/h2&gt;

&lt;p&gt;The 2019 Container Adoption Survey predicts that container technology will be a $4.3B market by 2022, double what it is today ($2.1B). To put that further into context, Dave Nugent explained that 87% of IT Admins who responded to that survey this year are running containers, and 90% of those containers are in production. Of the IT Admins who responded, 65% are using two or more orchestration tools, such as Kubernetes. (Just three years ago, 72% of respondents had said that no, they were not using orchestration services. By last year, the numbers had climbed only a little, with only 34% of respondents saying they were using Kubernetes. So those figures from 2019 are impressive).&lt;/p&gt;

&lt;p&gt;On that note, if you know containers, you know how popular Google's container orchestration technology Kubernetes is. On the &lt;a href="http://github.com/kubernetes/kubernetes" rel="noopener noreferrer"&gt;Kubernetes repo on GitHub&lt;/a&gt;, you can see that it has 84,000+ commits, 2,200+ open issues, and a whopping 30,000 issues that are closed.&lt;/p&gt;

&lt;p&gt;In other words, containers and their orchestrators are on very heavy rotation.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Little Go History, and its Choice for both Docker and Kubernetes
&lt;/h2&gt;

&lt;p&gt;From Todd McLeod's presentation, I learned how Golang was invented. In 2005, Google assessed every programming language on the planet but didn't find any that met their needs at the time. For context, multicore computers were a new thing, so there weren't yet any programming languages capable of natively benefitting from such computers, i.e., using multiple cores to benefit from parallelism.&lt;/p&gt;

&lt;p&gt;Google wanted three things:&lt;/p&gt;

&lt;p&gt;1) ease of programming&lt;br&gt;
2) efficient execution&lt;br&gt;
3) efficient compilation&lt;/p&gt;

&lt;p&gt;After not finding a language that could achieve all three, and wishing to utilize a language that could take advantage of multicore processing, Google asked Ken Thompson (of B, C, Unix, and UTF-8), Robert G (of HotSpot and JVM), and Rob Pike (also of Unix, UTF-8) to create such a language, and Go was the result.&lt;/p&gt;

&lt;p&gt;Kubernetes and Go both coming from Google, I get why Go was the obvious choice to write Kubernetes. What's interesting is that Docker is also written in Go. Perhaps Go was chosen for Docker because of Go's reputation as a security-conscious, type-safe, and fast language, or it could have been a coincidence.&lt;/p&gt;
&lt;h2&gt;
  
  
  Alternatives to Docker?
&lt;/h2&gt;

&lt;p&gt;I noticed that Docker had the strongest word-of-mouth of any container platform throughout the conference. There are other container runtime engines, such as &lt;strong&gt;containerd&lt;/strong&gt; and CoreOS's &lt;strong&gt;rkt&lt;/strong&gt;. But Docker is by far the most popular container runtime today.&lt;/p&gt;

&lt;p&gt;Even in the enterprise space, Docker is the main contender currently. Both Google via Kubernetes and IBM via Red Hat OpenShift make heavy use of Docker's container infrastructure. But it will be interesting to see if any viable alternatives to Docker emerge in the coming years, in the enterprise or beyond. One space to watch may be Google's relatively new offering, &lt;strong&gt;KNative&lt;/strong&gt; ("Kubernetes meets Serverless"), which is pitched as having the best of containers plus the best of FaaS and PaaS serverless architecture. I don't yet know enough about the history of Linux containers, about why Docker became so popular, and about what Docker did better than anyone else at a technical level and a community level to become so attractive and widely adopted, but in tech, nothing lasts forever. Even top-tier, hyper-popular incumbent technologies get disrupted eventually, and sometimes quickly.&lt;/p&gt;

&lt;p&gt;What would it take? This &lt;a href="https://www.youtube.com/watch?v=0Bo-RA0sGLU&amp;amp;feature=youtu.be" rel="noopener noreferrer"&gt;Elon Musk quote&lt;/a&gt; is pretty relevant on this point:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"If you're entering anything where there's an existing marketplace, against large, entrenched competitors, then your product or service needs to be much better than theirs. It can't be a little bit better, because then you put yourself in the shoes of the consumer... you're always going to buy the trusted brand unless there's a big difference."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I'm loving learning docker but am also intrigued about larger questions of what makes containers so interesting, and so interesting right now, and what new technologies, new pressures, and new solution trends could mean for containers in the future. Lots to learn!&lt;/p&gt;
&lt;h2&gt;
  
  
  To Understand Docker Security, Understand Linux Security
&lt;/h2&gt;

&lt;p&gt;As I heard in Sunil Sabat's lecture, the security principles behind Docker (and Kubernetes) actually build on the sound security foundations known to those familiar with the Linux ecosystem. The best practices applied to Linux kernels transfer nicely to Linux containers and Kubernetes clusters &amp;amp; pods.&lt;/p&gt;

&lt;p&gt;The building blocks are things like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;resource limits&lt;/strong&gt; on CPU and memory usage and requests&lt;/li&gt;
&lt;li&gt;kernel &lt;strong&gt;namespaces&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;control groups (cgroups)&lt;/strong&gt; for runtime security and to enforce isolation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mandatory access control (MAC)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;security profiles, policies, and features like &lt;strong&gt;AppArmor&lt;/strong&gt;, &lt;strong&gt;SELinux&lt;/strong&gt;, and &lt;strong&gt;seccomp&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All pretty advanced stuff, but also all relevant for the "container supply chain" that extends fro Linux to Docker to Kubernetes and into cloud platforms like AWS or GCP.&lt;/p&gt;
&lt;h2&gt;
  
  
  Some More TidBits
&lt;/h2&gt;

&lt;p&gt;There's lots more that I learned about at the conference, but here is a roundup of other miscellany:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cool new concept / term overheard: &lt;strong&gt;pre-warmed containers&lt;/strong&gt;. This is relevant in situations when you want to avoid long "cold-start times" for container images that haven't been run for weeks&lt;/li&gt;
&lt;li&gt;With &lt;strong&gt;Google Cloud Run&lt;/strong&gt;, which is a managed platform for stateless containers, it's possible to get Google to run containers for you, and you can later choose to do your own container engineering ops&lt;/li&gt;
&lt;li&gt;I heard a cool example of using a container to run an open-source PDF conversion app to automatically convert Word documents into PDFs on GCP&lt;/li&gt;
&lt;li&gt;Martin Omander of Google says he recently got a COBOL hello world app running in a container :)&lt;/li&gt;
&lt;li&gt;With FaaS/PaaS platforms like IBM OpenWhisk, you can "run anything in Docker as function"&lt;/li&gt;
&lt;li&gt;More from IBM: I saw a presentation on how its &lt;strong&gt;Model Asset Exchange (MAX)&lt;/strong&gt; and &lt;strong&gt;Data Asset Exchange (DAX)&lt;/strong&gt; can be used to a) find open-source deep learning algorithms, b) find open-source data sets, and then c) use Docker containers to deploy lightweight neural networks for data analysis. In other words, you can run machine learning models as microservices using Docker. Wow!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There was more, but that's all I can squeeze in for this week. But not before some bonus Q&amp;amp;A!&lt;/p&gt;
&lt;h1&gt;
  
  
  This Week's Docker Answer Roundup
&lt;/h1&gt;

&lt;p&gt;As I learn, I'm answering questions. Here are a few I answered this week.&lt;/p&gt;
&lt;h3&gt;
  
  
  On the purpose of Docker
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: What is the purpose of Docker?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/What-is-the-purpose-of-Docker/answer/Alex-Ortiz-308" rel="noopener noreferrer"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;The purpose of Docker is to help you &lt;strong&gt;create and deploy Linux containers easily, portably, and reliably&lt;/strong&gt;. For some technology architectures and use cases, running apps on a local machine or a virtual machine makes a lot of sense, but for situations when you want to run stateless applications or tasks that can be containerized quickly and also deployed across dozens, hundreds, or even thousands of users, Linux containers are sometimes the way to go. When that’s the case, Docker gives you a mechanism to create those containers (using &lt;a href="https://www.quora.com/What-are-Docker-Images/answer/Alex-Ortiz-308" rel="noopener noreferrer"&gt;Docker images&lt;/a&gt;).&lt;/p&gt;
&lt;h3&gt;
  
  
  On what Dockerfiles are for
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: What is Dockerfile for in Docker?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/What-is-Dockerfile-for-in-Docker/answer/Alex-Ortiz-308" rel="noopener noreferrer"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;A &lt;a href="https://docs.docker.com/engine/reference/builder/" rel="noopener noreferrer"&gt;Dockerfile&lt;/a&gt; is a plaintext document in which you list the instructions Docker needs to use to create a &lt;strong&gt;Docker image&lt;/strong&gt;. From that Docker image, docker containers can later be made and run. (A container is a single process, task, or application.)&lt;/p&gt;

&lt;p&gt;The instructions in the Dockerfile include instructions like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which &lt;strong&gt;base image&lt;/strong&gt; (for example, which Linux operating system) your application runs on;&lt;/li&gt;
&lt;li&gt;which commands to run or &lt;strong&gt;application dependencies&lt;/strong&gt; to install&lt;/li&gt;
&lt;li&gt;files or directories that must be &lt;strong&gt;copied&lt;/strong&gt; to the docker container in order for your app to work correctly&lt;/li&gt;
&lt;li&gt;which &lt;strong&gt;ports&lt;/strong&gt; need to be exposed (if applicable) for your application to work&lt;/li&gt;
&lt;li&gt;and lots more&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this information in the Dockerfile is then used by your Docker host (server or daemon) to create a &lt;strong&gt;docker image&lt;/strong&gt; that can be used and reused to build any number of containers.&lt;/p&gt;
&lt;h3&gt;
  
  
  On the difference between two similar-looking docker commands
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: What are the differences between the ‘docker run’ and the ‘docker create’?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/What-are-the-differences-between-the-docker-run-and-the-docker-create/answer/Alex-Ortiz-308" rel="noopener noreferrer"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;The instruction &lt;code&gt;docker run&lt;/code&gt; is really a combo command of two instructions in one: &lt;code&gt;docker create&lt;/code&gt; + &lt;code&gt;docker start&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;docker create&lt;/code&gt; builds you a container from a docker image&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;docker start&lt;/code&gt; instantiates the container&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There will be situations in which you want to create a container without actually starting it. If so, you’d use &lt;code&gt;docker create&lt;/code&gt;, and later on you’d use &lt;code&gt;docker start&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here’s an example.&lt;/p&gt;

&lt;p&gt;Let’s say you create three linux containers based on the latest version of alpine. Suppose you name them &lt;em&gt;container1&lt;/em&gt;, &lt;em&gt;container2&lt;/em&gt;, and &lt;em&gt;container3&lt;/em&gt;, so that you can refer to them with these custom names rather than with their default names or container IDs.&lt;/p&gt;

&lt;p&gt;You would use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker create --name="container1" alpine:latest sleep 600
docker create --name="container2" alpine:latest sleep 600
docker create --name="container3" alpine:latest sleep 600
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are the components of these instructions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docker create&lt;/code&gt; is the instruction to create the container&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--name="custom_name"&lt;/code&gt; specifies a key-value pair that names the container&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;alpine:latest&lt;/code&gt; is the docker image from which the container instance is made&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sleep 600&lt;/code&gt; is a Linux command (explained below)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Alpine is a lightweight Linux operating system, not an application or process, so if you used &lt;code&gt;docker create --name="container1" alpine:latest&lt;/code&gt;, without the sleep command, then Docker would create an alpine container but &lt;em&gt;immediately&lt;/em&gt; exit it, because there’s nothing happening inside that container. So for this example’s sake, we keep our three alpine containers running for 10 minutes by using the Linux sleep command set to 600 seconds.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Docker would thus create three alpine containers for you, each remaining active for 600 seconds, i.e., ten minutes. But the three containers would not yet be running.&lt;/p&gt;

&lt;p&gt;If you checked this, by typing &lt;code&gt;docker ps -a&lt;/code&gt; into the docker command line, your three containers would show up with a &lt;strong&gt;STATUS&lt;/strong&gt; of “Created”.&lt;/p&gt;

&lt;p&gt;Now comes the important part. Since you’ve used the &lt;code&gt;docker create&lt;/code&gt; command, you could then selectively start one of these containers at will. For example, &lt;em&gt;container1&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker start container1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, &lt;em&gt;container1&lt;/em&gt; would show up with a &lt;strong&gt;STATUS&lt;/strong&gt; of “Up”, and &lt;em&gt;container2&lt;/em&gt; and &lt;em&gt;container3&lt;/em&gt; would continue to show up with a &lt;strong&gt;STATUS&lt;/strong&gt; of “Created”, as before.&lt;/p&gt;

&lt;p&gt;From there, you can start, stop, or restart a container as you please. (Of course, in this example, after ten minutes, Docker will exit these containers, per the Sleep instructions from above.)&lt;/p&gt;




&lt;p&gt;In summary, &lt;code&gt;docker run&lt;/code&gt; creates and immediately starts a container, whereas &lt;code&gt;docker create&lt;/code&gt; lets you create a container without starting it. This gives you the flexibility to start and immediately run containers when you need to while also being able to create containers that you don’t. For example, if you wanted to run a command inside a container that had already been created &lt;em&gt;and&lt;/em&gt; was already running, it wouldn’t make sense to use the command &lt;code&gt;docker run&lt;/code&gt;, as that command always creates a &lt;em&gt;new&lt;/em&gt; (additional) container. You would simply use &lt;code&gt;docker create&lt;/code&gt; and then &lt;code&gt;docker start&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;:)&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Helpful Resources
&lt;/h2&gt;

&lt;p&gt;Here are a few items I found helpful this past week:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Online Playground: &lt;a href="https://labs.play-with-docker.com/" rel="noopener noreferrer"&gt;Play With Docker&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Video: &lt;a href="https://www.youtube.com/watch?v=PH-2FfFD2PU" rel="noopener noreferrer"&gt;VMWare, Kubernetes in 5 mins&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Book: &lt;a href="https://www.amazon.com/Linux-Command-Line-Complete-Introduction/dp/1593273894" rel="noopener noreferrer"&gt;William E Shotts Jr., The Linux Command Line: A Complete Introduction&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And with that, I say farewell to another week of docker learn. See you next time!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fpjdsz3ve5wc0zmcb33f3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fpjdsz3ve5wc0zmcb33f3.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hit the follow button, and be sure to stay up to date on all the awesome work my teams are doing at &lt;a href="https://www.educative.io/" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt; and in our &lt;a href="https://www.educative.io/edpresso" rel="noopener noreferrer"&gt;EdPresso Community&lt;/a&gt;. They are awesome and you should follow them on Twitter at &lt;a href="https://twitter.com/Educativeinc" rel="noopener noreferrer"&gt;@educativeinc&lt;/a&gt; and &lt;a href="https://twitter.com/EdpressoC" rel="noopener noreferrer"&gt;@edpressoc&lt;/a&gt;, respectively.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
    </item>
    <item>
      <title>docker learn #02: Package Managers</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Fri, 18 Oct 2019 22:07:42 +0000</pubDate>
      <link>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-02-2723</link>
      <guid>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-02-2723</guid>
      <description>&lt;p&gt;Last week, I launched my new &lt;a href="https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-01-fli"&gt;docker learn&lt;/a&gt; series. I'm learning Docker so I can be more effective in my work at &lt;a href="https://educative.io"&gt;Educative&lt;/a&gt; and interacting with the global developer community. I'll be sharing my learning journey as a series of posts, snapshots of what I'm learning as well as how I'm learning it. Hopefully this helps other Docker newbies out there like me, both now and in the future. Here's the second post in the series.&lt;/p&gt;

&lt;h2&gt;
  
  
  A New Learning: Package Management
&lt;/h2&gt;

&lt;p&gt;In Dockerfiles at work, I'd seen commands like &lt;code&gt;RUN apt-get install xyz&lt;/code&gt; and &lt;code&gt;RUN apt-get update&lt;/code&gt; and had wondered what they encode. I've since learned that Linux distributions based on Debian use the &lt;strong&gt;.deb&lt;/strong&gt; format for package files, and the Advanced Package Tool, or &lt;code&gt;apt&lt;/code&gt;, for package management. So the &lt;code&gt;apt-get install&lt;/code&gt; and &lt;code&gt;apt-get update&lt;/code&gt; commands are used to prompt a Docker daemon to install or update software packages needed for Docker container payloads to run properly, if those payloads are based on Linux operating systems that are Debian-based, such as Ubuntu.&lt;/p&gt;

&lt;p&gt;This is in contrast to Linux distributions based on Red Hat, such as the Fedora operating system, which uses &lt;strong&gt;.rpm&lt;/strong&gt; package formats and package managers like &lt;code&gt;rpm&lt;/code&gt; or &lt;code&gt;dnf&lt;/code&gt;. Alpine Linux, about which I answer a question below, uses &lt;code&gt;apk&lt;/code&gt; for package management. It's cool that, by reading instructions on a Dockerfile, you can make inferences about the underlying operating systems containerized applications utilize.&lt;/p&gt;

&lt;p&gt;I feel like I leveled up just writing that.&lt;/p&gt;

&lt;p&gt;😜&lt;/p&gt;

&lt;h2&gt;
  
  
  My Answer Roundup
&lt;/h2&gt;

&lt;p&gt;One of the best ways to learn something is to teach it. By sharing what you know, you achieve two things. First, you get to practice and access your knowledge in a way that maps to a real-world request, which is a subtle form of learning by problem-solving. Second, you pull recently acquired knowledge closer to your center, making it easier for you to assess what you've already internalized and what will extend your knowledge horizon further out. &lt;/p&gt;

&lt;p&gt;So I've been answering one question per day on the web. Below is a roundup of those questions. If I got something wrong, go ahead and correct me in the comments (thank you).&lt;/p&gt;

&lt;h3&gt;
  
  
  On the role of Docker Compose vs that of a Dockerfile
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: Why do we need Docker Compose when there is Dockerfile (I am a newbie at using Docker)? Am I missing something?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/Why-do-we-need-Docker-Compose-when-there-is-Dockerfile-I-am-a-newbie-at-using-Docker-Am-I-missing-something/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Docker lets you run a single instance of one process or task or application inside a container&lt;/li&gt;
&lt;li&gt;To run that container, you need a docker image to base the container off of&lt;/li&gt;
&lt;li&gt;To create the docker image, you need a Dockerfile—a set of instructions docker will follow to create the necessary docker image&lt;/li&gt;
&lt;li&gt;If you’re only running one process/task/app, you only need one container. But what do you do if you have a situation that requires multiple processes/tasks/apps to work together? Well, you might need multiple containers&lt;/li&gt;
&lt;li&gt;Docker Compose provides a way to deploy and coordinate—or &lt;strong&gt;orchestrate&lt;/strong&gt;—multiple containers&lt;/li&gt;
&lt;li&gt;In that case, you would need a Docker Compose file in the format of JSON or YAML, with information about each process/task/app, how they work together (the relationships between them), their networking and configuration info, and so on&lt;/li&gt;
&lt;li&gt;Note that every different process/task/application will need to be built off of a different docker image, and therefore you will need a different Dockerfile for each one. For example, if you’re running an app that requires Node for the frontend and a database for the backend, then you will need a Dockerfile for the image used to create the Node container and a different, separate Dockerfile for the image used to create the database container. Then, you will use a Docker Compose file to coordinate how the two containers will work together&lt;/li&gt;
&lt;li&gt;So in summary, a Dockerfile is used to create a docker image capable of running a single instance of one process/task/application inside a container. A Docker Compose file is used to create a &lt;strong&gt;pod&lt;/strong&gt; of containers that work together to bring your multi-container use case to life&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  On choosing base images for Dockerfiles
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: When using multiple tools (Node, MySQL, Meteor), what should I choose as a base image for my Dockerfile?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/When-using-multiple-tools-Node-MySQL-Meteor-what-should-I-choose-as-a-base-image-for-my-Dockerfile/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;This will only partially answer your question, but I hope this is helpful. You won’t just have one Dockerfile: you’ll have more than one. That’s because in the container model, each tool or process—MySQL and Meteor, for example—runs in a separate container. A MySQL container will be based on a MySQL image; a Meteor container will be based on a Meteor image. Therefore, you’ll end up with two separate Dockerfiles, one for MySQL and one for Meteor. (I imagine that because Meteor relies on NodeJS as its language runtime, any Meteor image will already be running node, i.e., the Dockerfile used to build the Meteor image will likely have an instruction to create a NodeJS image layer).&lt;/p&gt;

&lt;p&gt;Once you have the Dockerfiles you need to build the images your app requires, then you’ll likely use a container orchestrator like Docker Compose to configure this multi-container setup.&lt;/p&gt;

&lt;p&gt;The choice of base image for each Dockerfile is currently beyond my knowledge horizon. But here are a few resources I came across that may or may not be helpful to you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://guide.meteor.com/deployment.html#docker"&gt;Deployment and Monitoring | Meteor Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/de/docs/guides/nodejs-docker-webapp/"&gt;Dockerizing a Node.js web app | Node.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hub.docker.com/_/mysql"&gt;Docker Hub (MySQL)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  On what Docker images are
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: What are Docker Images?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/What-are-Docker-Images/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;The logo of &lt;strong&gt;Moby Dock&lt;/strong&gt; (the blue Docker whale with the 9 shipping containers on top of it) is helpful here. In Docker, each container is, ideally, a single task, process, or application. One per container. The container is a single, short-lived instance of that one task, process, or application. Those containers run on a Linux machine, either natively or on a Linux virtual machine running on Windows or Mac. So in the Docker logo, those nine containers are independent instances of one or more tasks, processes, or applications, and Moby Dock represents the Linux server(s) those containers run on.&lt;/p&gt;

&lt;p&gt;To build a container, you need a Docker image. That image is created with a set of instructions, a Dockerfile. Once you build the docker image for a particular task, process, or application, then you and anyone with access to that docker image can easily run as many containers for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  On why Alpine is popular as a Linux distro
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: Why is Alpine Linux so popular as base Docker image?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/Why-is-Alpine-Linux-so-popular-as-base-Docker-image/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;: &lt;/p&gt;

&lt;p&gt;The base image for Alpine Linux is &lt;em&gt;much&lt;/em&gt; smaller than that of other Linux images, such as Ubuntu. For example, the &lt;a href="https://hub.docker.com/_/alpine?tab=tags"&gt;alpine:latest&lt;/a&gt; image is only 2.66 MB in size. By comparison, the &lt;a href="https://hub.docker.com/_/ubuntu?tab=tags"&gt;ubuntu:latest&lt;/a&gt; image is 10X larger: 25.48MB in size. This might not seem like much of a difference, but smaller images and faster build times make a difference when you have apps in production at scale. And for some container applications, Ubuntu might be overkill where Alpine will do just fine. So that’s probably one reason.&lt;/p&gt;

&lt;p&gt;But it does come with a trade-off: for example, the Alpine image has the faster and more lightweight Unix shell &lt;strong&gt;Ash&lt;/strong&gt;, whereas the Ubuntu Linux image comes with the more “feature-rich” Unix shells like &lt;strong&gt;Bash&lt;/strong&gt; and &lt;strong&gt;Dash&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  On Netflix's lack of Kubernetes
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: Does Netflix use Kubernetes?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/Does-Netflix-use-Kubernetes/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Netflix does not use Kubernetes. As of 2017, Netflix’s architecture was running millions of Docker containers on virtual machines (VMs) hosted on AWS EC2. But rather than use Kubernetes as the scheduler and orchestrator for all these Docker containers, Netflix built its own container runtime and scheduler, &lt;strong&gt;Titus&lt;/strong&gt;, which was based on Apache Mesos and ran on AWS EC2. You can read more &lt;a href="https://medium.com/netflix-techblog/the-evolution-of-container-usage-at-netflix-3abfc096781b"&gt;here&lt;/a&gt;, &lt;a href="https://medium.com/netflix-techblog/titus-the-netflix-container-management-platform-is-now-open-source-f868c9fb5436"&gt;here&lt;/a&gt;, and &lt;a href="https://medium.com/netflix-techblog/predictive-cpu-isolation-of-containers-at-netflix-91f014d856c7"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  On what makes Kubernetes useful
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: How is Kubernetes so powerful? What can be done with it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's my &lt;a href="https://www.quora.com/How-is-Kubernetes-so-powerful-What-can-be-done-with-it/answer/Alex-Ortiz-308"&gt;answer&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Running individual tasks, processes, or software applications in standalone, easy-to-deploy, reliable Linux containers is a great way to add horizontal and vertical scale to a technology stack. But as the number of containers in your architecture grows, so does the need to coordinate them—&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how do they talk to each other?&lt;/li&gt;
&lt;li&gt;how do you automate the manual-heavy work of building Docker images and deploying containers based on those images?&lt;/li&gt;
&lt;li&gt;how do you handle dips and spikes in container use, especially if you have hundreds, or thousands, of containers running at any given time?&lt;/li&gt;
&lt;li&gt;how do you deal with containers that rely on other containers before they work, e.g., a database container needs to be active and volume-mounted before another application container can do its job correctly?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these things and a dozen other questions are what &lt;strong&gt;container schedulers and orchestrators&lt;/strong&gt; like Kubernetes are meant to help answer. With Kubernetes, you can deploy and manage 1,000 or 2,000 Docker containers while addressing the host of questions I mentioned above. This is a simple starting point but hopefully helpful in contextualizing the power of Kubernetes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Helpful Resources
&lt;/h2&gt;

&lt;p&gt;Here are a few items I found helpful this past week:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Video Presentation: &lt;a href="https://www.youtube.com/watch?v=gMpldbcMHuI"&gt;Redbeard, Sysdig and CoreOS Meetup Jul '15: Best Practices For Container Environments&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Video Presentation: &lt;a href="https://www.youtube.com/watch?v=wxxigbHwDGM"&gt;KodeKloud, Understanding Docker&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Article: &lt;a href="https://ericchiang.github.io/post/containers-from-scratch/"&gt;Eric Chiang, Containers from Scratch&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's all I've got for this week. See you next time!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
    </item>
    <item>
      <title>docker learn #01: My Learning Journey with Docker Begins!</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Fri, 11 Oct 2019 22:51:07 +0000</pubDate>
      <link>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-01-fli</link>
      <guid>https://dev.to/alexoeducative/docker-learn-my-learning-journey-with-docker-01-fli</guid>
      <description>&lt;p&gt;I've started learning Docker.&lt;/p&gt;

&lt;p&gt;For context, I'm the Lead of Developer Sales and Success at &lt;a href="https://educative.io"&gt;Educative.io&lt;/a&gt;, a software development learning platform for developers and computer science professionals to learn new skills. Our customers love our platform because they can buy high-quality, self-paced courses in the specific programming language, development framework, or topic they need. These courses equip them with new skills, new knowledge, and the confidence to advance in their craft or prepare for new opportunities.&lt;/p&gt;

&lt;p&gt;Part of my job is to find software developers and engineers with subject-matter expertise in specific areas. These Authors then create interactive online learning courses to sell on our platform. The courses are text-only (no video) and often contain quizzes, executable code snippets, and interactive challenges that help learners learn. Even though &lt;a href="https://www.educative.io/courses/author-guide"&gt;our free tools&lt;/a&gt; for writing these courses are pretty sweet, not every language, framework, or library works out-of-the-box. In some cases, the content creator can leverage our Docker functionality to containerize the app or the learning environment their students will need to interact with.&lt;/p&gt;

&lt;p&gt;When this happens, I put on my other hat: supporting Authors as they build their courses, acting as a go-between from the external content creator to our internal dev team to answer questions and remove blockers. This can include things like creating custom &lt;a href="https://docs.docker.com/engine/reference/builder/"&gt;Dockerfiles&lt;/a&gt;, troubleshooting image builds, or &lt;a href="https://www.educative.io/courses/author-guide/N8BDr3LGopv"&gt;customizing docker jobs&lt;/a&gt; to work with our teaching tools.&lt;/p&gt;

&lt;p&gt;But I don't know Docker. So I've started learning!&lt;/p&gt;

&lt;p&gt;In this series, I'll share what I learn as well as the learning journey itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  On Learning Openly
&lt;/h2&gt;

&lt;p&gt;I'm a big fan of learning openly, of open-sourcing your learning journeys, as they say. It is very satisfying to learn something new and hard and share the learning path with others as you go. You might get some things wrong along the way, of course, but that's part of what learning is: coming to understand a skill or a subject through an ongoing dialogue of hits and misses, successes and failures, roadblocks and open roads.&lt;/p&gt;

&lt;p&gt;One upside of this approach is that two things become a resource to others:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;your learnings&lt;/li&gt;
&lt;li&gt;the learning journey itself&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's the what and the how, packaged together. Whoever follows or joins you along the way can utilize the grooves you've already set.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Take everything I'll share in this series with a learner's grain of salt. Definitely do your own reading (DYOR), and, when in doubt, check out Docker's very excellent &lt;a href="https://docs.docker.com/"&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By the way, this won't be a comprehensive or how-to series per se. It'll be a collection of learning snapshots. So I invite readers of this &lt;strong&gt;docker learn&lt;/strong&gt; series to fill in their own gaps with Youtube videos, books, online courses, Docker's technical documentation, and hands-on exercises. I'll share some of these resources in my posts.&lt;/p&gt;

&lt;p&gt;Here we go.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I've Learned So Far: The Basics and Some Simple Commands
&lt;/h2&gt;

&lt;p&gt;Writing summaries off the top of your head is a great way to review what you're learning. This improves memory consolidation and future recall, and it boosts your confidence.&lt;/p&gt;

&lt;p&gt;So here's a simple summary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Basic Knowledge
&lt;/h3&gt;

&lt;p&gt;Some of the Docker basics I've learned so far include these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the purpose of a Dockerfile&lt;/li&gt;
&lt;li&gt;what a docker container is&lt;/li&gt;
&lt;li&gt;how a docker daemon pulls a docker image from the image registry in order to launch a particular container (i.e., an instance of that image)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Dockerfile is a list of instructions. These instructions are fed from a client to a docker daemon running on a docker host machine (server). The docker daemon consumes the instructions and builds a docker image. The docker image is stored in a registry and downloaded to the host machine the first time you build a container from that image. The docker container includes the specific application, task, or other process you defined in the Dockerfile. When you run a container, you're running a temporary, short-lived instance of that application, task, or process.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Few Important Basic Commands
&lt;/h3&gt;

&lt;p&gt;Here are some important commands I've learned about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker build&lt;/code&gt; -&amp;gt; takes a Dockerfile as input and builds a docker image out of it&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker pull xyz&lt;/code&gt; -&amp;gt; downloads a specific docker image, which you specify, to your docker host machine, but does not launch a container for that image&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker run xyz&lt;/code&gt; -&amp;gt; launches (runs) a container from the image you specify. So, for instance, &lt;code&gt;docker run node&lt;/code&gt; will run a NodeJS instance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker ps&lt;/code&gt; -&amp;gt; prints a list of containers you're currently running, along with metadata about each, e.g. name, ID, how long each container has been running, and so on&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker stop xyz&lt;/code&gt; -&amp;gt; stops a running container (kinda like force quitting an app, but here it's a containerized instance of that app)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker start xyz&lt;/code&gt; -&amp;gt; starts a container you've previously stopped&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker ps -a&lt;/code&gt; -&amp;gt; prints a list of &lt;em&gt;all&lt;/em&gt; containers, both the ones running and any you've stopped but haven't yet removed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker rm xyz&lt;/code&gt; -&amp;gt; removes a container you specify (containers run on, and are thus removed from, your docker host)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker rmi xyz&lt;/code&gt; -&amp;gt; deletes an image (as opposed to a container). Note that this removes the image from your docker host machine, but it does not remove it from the docker registry, naturally&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are a lot more commands and many options (flags) for each command, but this is about what I understand at the moment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus: &lt;code&gt;MAINTAINER&lt;/code&gt; vs &lt;code&gt;LABEL&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;I learned this week that the docker instruction &lt;code&gt;MAINTAINER&lt;/code&gt; &lt;a href="https://docs.docker.com/engine/reference/builder/#maintainer-deprecated"&gt;has been deprecated&lt;/a&gt; in favor of a &lt;code&gt;LABEL&lt;/code&gt; instruction. The latter is more flexible and allows the docker image author’s name to be printed alongside &lt;a href="https://docs.docker.com/config/labels-custom-metadata"&gt;other object metadata&lt;/a&gt; when running the &lt;code&gt;docker inspect&lt;/code&gt; command. So as a best practice, you should use the new approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sample Dockerfile Code - The OLD Way&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM base_image_name
MAINTAINER image_author_email_address
RUN command_to_run
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Sample Dockerfile - The NEW Way&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FROM base_image_name
LABEL maintainer="image_author_email_address"
RUN command_to_run
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Some Helpful Resources
&lt;/h2&gt;

&lt;p&gt;I'm working through a book and a bunch of videos. Here are just a few:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Book: &lt;a href="https://www.amazon.com/Docker-Shipping-Reliable-Containers-Production/dp/1492036730"&gt;Docker: Up &amp;amp; Running: Shipping Reliable Containers in Production 2nd Edition&lt;/a&gt; by &lt;a href="https://twitter.com/spkane"&gt;Sean P. Kane&lt;/a&gt; and &lt;a href="https://twitter.com/relistan"&gt;Karl Matthias&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Video Presentation: &lt;a href="https://www.youtube.com/watch?v=Q5POuMHxW-0"&gt;Solomon Hykes, Introduction to Docker&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Video Course: &lt;a href="https://www.youtube.com/watch?v=zJ6WbK9zFpI"&gt;Docker for Beginners: Full Course&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So there you have it. Independent learning is awesome and really fun. Sharing it is a blast as well.&lt;/p&gt;

&lt;p&gt;Thanks for reading &lt;strong&gt;docker learn&lt;/strong&gt;, and see you next time!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;docker plugs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a more extensive treatment of docker from my Educative team and our Authors, check out these other resources: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our recent blog post, &lt;a href="https://www.educative.io/blog/docker-kubernetes-beginners-guide"&gt;Getting started with Docker and Kubernetes: a beginners guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Our awesome course, &lt;a href="https://www.educative.io/courses/docker-for-developers"&gt;Docker for Developers&lt;/a&gt; by Educative Author &lt;a href="https://www.educative.io/profile/view/5933340110618624"&gt;Arnaud Weil&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Our EdPresso shots on &lt;a href="https://www.educative.io/edpresso/how-do-you-write-a-dockerfile"&gt;writing Dockerfiles&lt;/a&gt; and the &lt;a href="https://www.educative.io/edpresso/what-is-the-workdir-command-in-docker"&gt;WORKDIR command&lt;/a&gt;, &lt;a href="https://www.educative.io/edpresso/what-is-the-docker-build-command"&gt;docker build&lt;/a&gt;, the &lt;a href="https://www.educative.io/edpresso/what-is-the-cmd-command-in-docker"&gt;CDM instruction&lt;/a&gt;, and &lt;a href="https://www.educative.io/edpresso/what-is-the-docker-add-command"&gt;Docker ADD&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also hit that DEV.to Follow button, follow me on Twitter &lt;a href="https://twitter.com/alexoeducative"&gt;@alexoeducative&lt;/a&gt;, and check out our courses at &lt;a href="https://educative.io"&gt;Educative.io&lt;/a&gt;. If there's a topic you know well or you'd like to build a course, leave a comment—let's chat :).&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>devops</category>
    </item>
    <item>
      <title>Conversations with the World's JavaScript Developers Part 1</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Sat, 13 Jul 2019 21:21:42 +0000</pubDate>
      <link>https://dev.to/alexoeducative/conversations-with-the-world-s-javascript-developers-part-1-5chh</link>
      <guid>https://dev.to/alexoeducative/conversations-with-the-world-s-javascript-developers-part-1-5chh</guid>
      <description>&lt;p&gt;My work involves speaking with developers throughout the world. We have a platform for developers to share their knowledge with their peers in the format of text-based courses, and my job is to find content creators. So I get to talk to a LOT of developers. For example, in the last four months, I've spoken with 80+ developers and engineers who work in the following areas:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AngularJS, AWS, Bash, CSS, Dart, Data Analytics, Data Visualization, Design Patterns, Docker, EmberJS, Ethereum Blockchain, Firebase, GatsbyJS, Git, Golang, Java Spring, JavaScript, Kotlin, Kubernetes, Machine Learning, Microservices, MongoDB, Next, Node, Objective-C, Perl, Python, R, React, Serverless, Swift, Systems Design, TypeScript, Unit &amp;amp; Automated Testing, VueJS, &amp;amp; Web App Architecture&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Recently, I presented to a local JavaScript Meetup group about what I've learned from conversations pertaining to JavaScript, so I decided to share my learnings in the form of this post as well. What's neat about my conversations is that they span both developer tenure and geography: from junior front-end engineers and full-stack developers to 20-year veterans of embedded systems. These professionals come from the following countries: 🇦🇺🇦🇹🇧🇷🇨🇦🇭🇷🇫🇷🇮🇳🇮🇪🇮🇱🇩🇪🇱🇧🇲🇾🇳🇿🇳🇬🇷🇸🇪🇸🇬🇧🇺🇸🇿🇲 (that's Australia, Austria, Brazil, Canada, Croatia, France, India, Ireland, Israel, Germany, Lebanon, Malaysia, New Zealand, Nigeria, Serbia, Spain, the United Kingdom, the United States, and Zambia, with hopefully many more to come). About twenty of these conversations have centered on JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Want to learn JavaScript development or land a great JavaScript job? Check out &lt;a href="https://www.educative.io/track/beginning-front-end-developer" rel="noopener noreferrer"&gt;Become a Front-End Developer&lt;/a&gt;, &lt;a href="https://www.educative.io/track/advanced-front-end-developer" rel="noopener noreferrer"&gt;React for Front-End Developers&lt;/a&gt;, and &lt;a href="https://www.educative.io/track/ace-js-coding-interview" rel="noopener noreferrer"&gt;Ace the JavaScript Coding Interview&lt;/a&gt; to see if Educative can help you on your journey.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here are some of the insights and opinions I've gleaned from JavaScript developers worldwide.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Keeps Coming Up in Conversation?
&lt;/h2&gt;

&lt;p&gt;The languages that have most come up are plain &lt;em&gt;JavaScript&lt;/em&gt; and &lt;em&gt;TypeScript&lt;/em&gt;. On the framework side, there's been a much longer list: &lt;strong&gt;Angular&lt;/strong&gt;, &lt;strong&gt;Ember&lt;/strong&gt;, &lt;strong&gt;Express&lt;/strong&gt;, &lt;strong&gt;Gatsby&lt;/strong&gt;, &lt;strong&gt;Next&lt;/strong&gt;, &lt;strong&gt;Node&lt;/strong&gt;, &lt;strong&gt;React&lt;/strong&gt;, &lt;strong&gt;React Native&lt;/strong&gt;, and &lt;strong&gt;Vue&lt;/strong&gt;. Related tools and applications have included &lt;strong&gt;Jest&lt;/strong&gt; to test the Vue framework; &lt;strong&gt;Firebase&lt;/strong&gt; for connecting their JavaScript applications to a cloud-hosted, realtime database; and &lt;strong&gt;Redux&lt;/strong&gt; to manage state.&lt;/p&gt;

&lt;p&gt;This brings me to how these developers are using JavaScript in their daily work and in side projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  How is JavaScript Being Used?
&lt;/h2&gt;

&lt;p&gt;Here are a handful of the use cases I've encountered, all of which will be familiar to JavaScript developers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;building backends&lt;/em&gt; with Node, important because JavaScript itself has classically been a front-end language but Node extends upon that&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;creating web3 blockchain applications&lt;/em&gt; with React as the interface between existing web2 architecture and web3 backbones like Ethereum&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;visualizing large volumes of data&lt;/em&gt; using libraries like &lt;strong&gt;p5&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;creating responsive or static websites&lt;/em&gt; with Gatsby, GraphQL + &lt;strong&gt;Gridsome&lt;/strong&gt;, or React + Next&lt;/li&gt;
&lt;li&gt;with React Native, &lt;em&gt;building mobile business applications&lt;/em&gt; that are optimized for high traffic &amp;amp; high API call volumes&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;functional programming&lt;/em&gt; in JavaScript with the &lt;strong&gt;Ramda&lt;/strong&gt; library&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;building realtime apps&lt;/em&gt; and serverless applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And a lot else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do JavaScript Developers Love JavaScript? :)
&lt;/h2&gt;

&lt;p&gt;Developers gravitate to different languages for many different reasons. If you're building backends for critical automotive applications, compilers for large social networks, or mobile front-ends for fintech startups, the languages you learn and use will be way different, ranging from C++ and C# to JS. If you're steeped in Kubernetes, you likely know Go. And if your dream is to build next-gen mobile apps, then Kotlin and Swift are on your menu. Besides industry and type of software, other things like personal preference and how good the technical documentation for a language is matter too. This could be its own language-spanning article, but here's what &lt;em&gt;JavaScript&lt;/em&gt; developers have mentioned as reasons they love it so much:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JavaScript is &lt;em&gt;easy to grasp&lt;/em&gt;, &lt;em&gt;easy to build things with&lt;/em&gt;, and &lt;em&gt;pretty&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;JavaScript has many frameworks, which &lt;em&gt;gives developers flexibility&lt;/em&gt; in what they build and how&lt;/li&gt;
&lt;li&gt;The JavaScript language and framework ecosystem &lt;em&gt;changes rapidly&lt;/em&gt;. For example, &lt;strong&gt;React Hooks&lt;/strong&gt; &lt;a href="https://reactjs.org/docs/hooks-intro.html" rel="noopener noreferrer"&gt;came out as a feature of React 16.8&lt;/a&gt; just five months ago, yet it already offers some developers an alternative to Redux&lt;/li&gt;
&lt;li&gt;As mentioned earlier, JavaScript can be used alongside graphics libraries like p5.js to represent huge amounts of information, which is &lt;em&gt;attractive to data scientists who prefer working with JavaScript&lt;/em&gt; over Python&lt;/li&gt;
&lt;li&gt;Since the &lt;strong&gt;V8 JavaScript Engine&lt;/strong&gt; used in the world's most popular web browser (Chrome) is "optimized as heck", JavaScript &lt;em&gt;runs very fast on devices&lt;/em&gt; used by billions of people. I'm also told that JavaScript &lt;em&gt;handles things like event loop queues well&lt;/em&gt;, which creates fewer bottlenecks for web applications and attracts engineers and developers who are conscious of performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So JavaScript developers love JavaScript for reasons that extend beyond the language itself: it isn't just the ease-of-use, flexibility, and keep-you-on-your-toes freshness it affords its adopters. It's also that because so much of the modern world's technology stack runs—and runs well—on JavaScript, the language is a great choice for building in today's web-connected era. This seems to be the synopsis of sentiment about JavaScript from many.&lt;/p&gt;

&lt;h2&gt;
  
  
  What JavaScript Developers are Saying about...
&lt;/h2&gt;

&lt;p&gt;Here are a few opinions and observations I've encountered regarding the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the TypeScript language&lt;/li&gt;
&lt;li&gt;the JavaScript-friendly functional language &lt;strong&gt;Elm&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;the static site and progressive web app framework Gatsby&lt;/li&gt;
&lt;li&gt;the UI and single page application framework Vue &lt;/li&gt;
&lt;li&gt;the topic of &lt;strong&gt;testing&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TypeScript
&lt;/h3&gt;

&lt;p&gt;One developer I spoke to mentioned that because JavaScript was originally built so quickly—"it was made in a week"—it has always been a little rough around the edges. So “TypeScript tries to smooth out the rough edges of JavaScript". Additionally, TypeScript has become popular with advocates of type safety, as more developers embrace its importance for their code. And despite TypeScript being fairly new, released a mere six years ago, it's already matured to a point that some developers are using it alongside languages like C# to build complex systems, to assemble offline tools such as command line interfaces, and to create advanced user interfaces and web apps in Angular, per some of the examples I've come across.&lt;/p&gt;

&lt;h3&gt;
  
  
  Elm
&lt;/h3&gt;

&lt;p&gt;Some JavaScript developers have the opinion that Elm may someday be to TypeScript what TypeScript today is to JavaScript. In this view, a functional programming language like Elm confers a huge working advantage to front-end programmers because it interoperates with JavaScript and can be used to build high-performance graphical user interfaces (GUIs) for web browsers, perhaps for lighter use case scenarios than one would pursue with TypeScript and vanilla JS. So it may be worthwhile to get a head start by learning Elm today if you wish to build the front-ends of tomorrow. On that note, JavaScript developers who want to take on that challenge might enjoy this tip: since Elm inspired Redux, learning Redux &lt;em&gt;first&lt;/em&gt; may acclimate the newcomer to Elm faster. &lt;/p&gt;

&lt;p&gt;Elm developers for the time being do face a challenge, which is that the Elm community is still very small at a time when communities in other languages and frameworks are experiencing rapid growth.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vue
&lt;/h3&gt;

&lt;p&gt;Speaking of community, adoption of the Vue framework is growing globally, with large hubs of users in China, Eastern Europe, France, and Nigeria, among other places. One reason Vue is growing so quickly is how easy it is to learn compared to other frameworks for single page websites and user interfaces. The Vue community also exudes an inclusive, welcoming vibe that socially surrounds and engages its members both online and offline. This makes a lot of sense and is true of any space: when it's easier to come by answers and developers are willing to help you, it becomes easier to start creating and continue solving problems.&lt;/p&gt;

&lt;p&gt;Some Vue developers also add that Angular is harder to learn than React and React is more difficult to work with than Vue, making Vue the default best choice for some. Developers who feel this way still praise Vue for supporting advanced use cases and having functionality (e.g., lists) that some frameworks don't have. The Vue developers I've spoken to seem pretty bullish on the upsides Vue offers their work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gatsby
&lt;/h3&gt;

&lt;p&gt;Whereas Vue is used to build single page apps and web interfaces, Gatsby is used to create static and responsive websites. Gatsby adopters are saying that they're having a great time building static sites with low computational overhead, solid caching, and great performance. Gatsby also makes creating cross-browser &lt;a href="https://www.gatsbyjs.org/docs/progressive-web-app/" rel="noopener noreferrer"&gt;progressive web apps&lt;/a&gt; easier for them. It seems to be developing a reputation as a beloved JavaScript alternative (or analogue) to the excellent Ruby-based static site generator &lt;strong&gt;Jekyll&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Importance of Testing
&lt;/h3&gt;

&lt;p&gt;Last, and on a non-framework-related note, many developers will rightfully say that every programmer should be able to write &lt;em&gt;testable code&lt;/em&gt; and be able to demonstrate that they can do so. This is especially important for developers who aspire to lead development teams, because testable code leads to fewer bugs, regressions, and other problems that get in the way of consistent, reliable, scalable user experiences. In other words, if you want code that performs well, you have to test the code well also. Generally speaking, it's probably wise to invest time understanding topics like &lt;em&gt;manual and automated testing&lt;/em&gt;, the tools to use for both, and how to write good tests with such tools.&lt;/p&gt;

&lt;p&gt;Accordingly, there's a growing need for JavaScript-specific unit testing and automated software testing knowledge, because with the growth of JavaScript, more JS developers are advancing in their professions. As they become more senior, they are being gauged in part on whether or not they can write and ship code that can be continuously tested and improved.&lt;/p&gt;

&lt;p&gt;So what are JavaScript developers saying about testing? That being able to use tools like Jest to test their Vue apps, and state management libraries like Redux to make their code more testable from the get-go, is important to their development work. That their industry peers need to know about general &lt;em&gt;and&lt;/em&gt; JavaScript-specific unit testing, performance testing, automated testing, and QA. Unfortunately, I've also heard that there isn't yet the same volume of quality learning material available for testing as there is for technology areas like &lt;strong&gt;Docker&lt;/strong&gt;, &lt;strong&gt;Kubernetes&lt;/strong&gt;, cloud infrastructure, and web app architecture—but hopefully this is about to change. For example, in the last few weeks, several developers (which we call &lt;a href="https://www.educative.io/authors" rel="noopener noreferrer"&gt;Authors&lt;/a&gt; on the Educative learning platform) have told me they plan to create courses dedicated completely to testing.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Want to learn more about JavaScript testing? See if &lt;a href="https://www.educative.io/collection/10370001/6751199023857664" rel="noopener noreferrer"&gt;Testing Vue.js Components with Jest&lt;/a&gt; or &lt;a href="https://www.educative.io/collection/5024793980043264/5629499534213120" rel="noopener noreferrer"&gt;Learn Vue.js from Scratch: Building &amp;amp; Testing a Movie App&lt;/a&gt; can help.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now that we're on the topic of advice from developers to developers, let's see what my JavaScript contacts are learning about and think others should be too.&lt;/p&gt;

&lt;h2&gt;
  
  
  What JavaScript Developers Say JavaScript Developers Need to Succeed
&lt;/h2&gt;

&lt;p&gt;I've saved the best part of my share for last: what JavaScript developers throughout the world feel their peers should be learning in order to stay ahead and advance the art.&lt;/p&gt;

&lt;p&gt;The first perspective JavaScript developers have shared is that if you're switching from &lt;strong&gt;strongly typed languages&lt;/strong&gt; like Java, Kotlin, or Objective-C to a &lt;a href="https://en.wikipedia.org/wiki/Strong_and_weak_typing" rel="noopener noreferrer"&gt;weakly (loosely) typed&lt;/a&gt; language such as JavaScript, it can be difficult to make the context-switch. The learning curve for JavaScript can therefore be steep, even for seasoned developers, so invest time into learning &lt;em&gt;how&lt;/em&gt; to make that switch, and develop the mental models needed to make the most out of JavaScript. This is an important point for both newcomers to JS and experienced developers looking for fresh challenges.&lt;/p&gt;

&lt;p&gt;Some JavaScript developers also argue that their peers from non-traditional backgrounds who learn JavaScript without formal training in computer science will benefit from making time to learn &lt;strong&gt;formal language theory&lt;/strong&gt;. The view here is that developers who self-teach JavaScript at some point need to tussle with formal language concepts, after which they can push JavaScript to its true limits and advance further and faster in their programming careers. I like points of view like this that respect the intrinsic hands-on, learn-by-doing nature of software development while also acknowledging that conceptual theory can help developers transform what they're able to do with their skills. This seems like a balanced strategy.&lt;/p&gt;

&lt;p&gt;On a third and more tactical note, multiple developers have mentioned how important it is to understand and implement &lt;a href="https://medium.com/javascript-in-plain-english/promises-promises-promises-5ae43c26bb8d" rel="noopener noreferrer"&gt;promises&lt;/a&gt;, which are objects you can program today that are capable of returning values in the future. Knowledge of promises—what they are, how they work, when to use them, and why they're powerful—has been described as a &lt;em&gt;must-have&lt;/em&gt; in every JavaScript developer's toolkit.&lt;/p&gt;

&lt;p&gt;Here are a few more examples of areas JS developers are finding valuable to learn about and recommend to others for further study:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;web components&lt;/em&gt; &amp;amp; &lt;em&gt;web sockets&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;progressive web apps&lt;/em&gt; (PWAs)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;serverless backend frameworks&lt;/em&gt; (in Node)&lt;/li&gt;
&lt;li&gt;JavaScript-specific &lt;em&gt;interview skills&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The "Five-figure Salary Impact" of Strong Interview Prep
&lt;/h3&gt;

&lt;p&gt;I want to highlight that last one. For a lot of JavaScript developers, building amazing applications and becoming known and respected in their professional communities is its own reward, but if you're spending years of your life working hard to become great at what you do, then you naturally want to be well-compensated for your skills. As JavaScript developers climb career ladders and begin to field job offers from multiple companies, solid interview prep can actually make a big difference not only in reducing the time spent interviewing but also in enhancing the compensation packages and final offers extended. I've heard straight from developers that this can make on the order of a "five-figure impact": $$,$$$ more in salary for crushing your interviews. Our courses &lt;a href="https://www.educative.io/track/ace-js-coding-interview" rel="noopener noreferrer"&gt;related to coding interviews&lt;/a&gt;, &lt;a href="https://www.educative.io/collection/5668639101419520/5649050225344512" rel="noopener noreferrer"&gt;systems design prep&lt;/a&gt;, and &lt;a href="https://www.educative.io/collection/5642554087309312/5663204961157120" rel="noopener noreferrer"&gt;data structures and algorithms&lt;/a&gt; for whiteboarding exercises are popular sellers for this reason.&lt;/p&gt;

&lt;h1&gt;
  
  
  In Conclusion
&lt;/h1&gt;

&lt;p&gt;The global JavaScript landscape is large, varied, and filled with talent, ideas, and approaches. Developers and engineers in this space have diverse perspectives on how to build applications for web and mobile, on which approaches and frameworks to use, and on how to leverage related knowledge and tools to create awesome things. But every JavaScript developer I've spoken to is unified in this: they all have a passion for JavaScript itself, for continuous learning and experimentation, and for helping others grow along with them.&lt;/p&gt;

&lt;p&gt;That about covers it for my first "&lt;em&gt;Conversations with the World's Developers&lt;/em&gt;". If you'd like to stay in touch as I learn more from talking to the world's devs in JavaScript and many other languages and frameworks, shoot me &lt;a href="//mailto:alex+devto@educative.io"&gt;an email&lt;/a&gt; or follow me on Twitter &lt;a href="https://twitter.com/alexoeducative" rel="noopener noreferrer"&gt;@alexoeducative&lt;/a&gt;. My team can be found at &lt;a href="https://twitter.com/Educativeinc" rel="noopener noreferrer"&gt;@Educativeinc&lt;/a&gt; as well. And if you want to see why 100,000 developers and engineers rave about our courses and tutorials and what our learning material is doing to advance their learning and their careers, check us out at &lt;a href="https://educative.io" rel="noopener noreferrer"&gt;Educative.io&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Teach Our Learners-Your Peers-What You Know
&lt;/h3&gt;

&lt;p&gt;Also, if you have software development experience in JavaScript or in a language, framework, or topic discussed in this post, and if you think you'd like to teach a course on our platform, go ahead and &lt;a href="//mailto:alex+devto@educative.io"&gt;send me a message&lt;/a&gt;. We have integrated compilers, an in-browser IDE, and a platform where students don't need to download anything: they just buy your course and start learning right away. Our content creation tools are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;welcoming (&lt;em&gt;you've never built a course before? We've got you&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;text-based (&lt;em&gt;you don't have a nice mic, an expensive camera, or video editing software? That's okay, your knowledge and a keyboard is plenty&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;accompanied by tons of free support from us during your content creation process to make sure your students end up with a great learning experience (&lt;em&gt;you're not on your own :)&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We'd love to have you join us as one of the first 100 developers in the world to release courses on Educative. &lt;a href="//mailto:alex+devto@educative.io"&gt;Get in touch&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'll continue having &lt;em&gt;Conversations with the World's JavaScript Developers&lt;/em&gt;, so see you in about six months for Part 2! Thanks for reading.&lt;/p&gt;

&lt;h4&gt;
  
  
  Appendix: JavaScript-Related Resources Mentioned
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://angular.io/" rel="noopener noreferrer"&gt;Angular&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://elm-lang.org/" rel="noopener noreferrer"&gt;Elm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://emberjs.com/" rel="noopener noreferrer"&gt;Ember&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;Express&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gatsbyjs.org/" rel="noopener noreferrer"&gt;Gatsby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gridsome.org/" rel="noopener noreferrer"&gt;Gridsome&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jestjs.io/" rel="noopener noreferrer"&gt;Jest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nodejs.org" rel="noopener noreferrer"&gt;Node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://p5js.org/" rel="noopener noreferrer"&gt;P5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ramdajs.com/" rel="noopener noreferrer"&gt;Rambda&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;React&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://facebook.github.io/react-native/" rel="noopener noreferrer"&gt;React Native&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://redux.js.org/" rel="noopener noreferrer"&gt;Redux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.typescriptlang.org/" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://v8.dev/" rel="noopener noreferrer"&gt;V8&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;Vue&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Liked this article? Heart and retweet this on Twitter:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1150192107597918208-257" src="https://platform.twitter.com/embed/Tweet.html?id=1150192107597918208"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1150192107597918208-257');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1150192107597918208&amp;amp;theme=dark"
  }



&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>A Learning Path from C++ to ASP.NET Core</title>
      <dc:creator>Alex Ortiz</dc:creator>
      <pubDate>Wed, 19 Jun 2019 00:44:33 +0000</pubDate>
      <link>https://dev.to/alexoeducative/a-learning-path-from-c-to-asp-net-core-1e62</link>
      <guid>https://dev.to/alexoeducative/a-learning-path-from-c-to-asp-net-core-1e62</guid>
      <description>&lt;p&gt;A contact of mine recently asked me a question. They wanted to know how to learn web development with ASP.NET Core 2.1 if they know some C++ but aren't yet familiar with the .NET framework. They asked me if I could suggest a possible learning path for them. So I reached out to some of the developers on my team: &lt;em&gt;if someone knows C++, what are a few of the stepping stones to .NET&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;One of my teammates suggested the following.&lt;/p&gt;

&lt;h2&gt;
  
  
  C++ --&amp;gt; C
&lt;/h2&gt;

&lt;p&gt;Although the .NET framework supports many languages, C# is the language most widely used with it. For example, ASP.NET is specifically a &lt;a href="https://dotnet.microsoft.com/apps/aspnet"&gt;framework for building web applications and services in .NET and C#&lt;/a&gt;. Learning the basics of programming in C# and how C# differs from C++ is therefore an essential first step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Web Development
&lt;/h2&gt;

&lt;p&gt;The learner should also then invest time in learning about web development: client-side frameworks, server-side frameworks, Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), how JavaScript is used alongside HTML and CSS to build web pages, and related web development concepts together form a layer of knowledge on which to build .NET-specific learnings.&lt;/p&gt;

&lt;h2&gt;
  
  
  .NET --&amp;gt; ASP.NET --&amp;gt; ASP.NET Core
&lt;/h2&gt;

&lt;p&gt;Having laid this initial foundation of C# and web development basics, it becomes useful to spend time with the .NET framework, as well as the usage particulars of ASP.NET. The latter is a server-side framework that is itself part of the .NET framework and is/was the progenitor &lt;a href="https://en.wikipedia.org/wiki/ASP.NET_Core"&gt;of ASP.NET Core&lt;/a&gt;. The key thing to keep in mind here is that there are &lt;em&gt;many&lt;/em&gt; frameworks and libraries available for .NET, and if you start learning about all of them, it can become overwhelming. So a person just starting out with .NET and wishing to build web apps with that framework should focus on how to use ASP.NET Core but without going too deep into the gritty details of .NET vs ASP.NET for now.&lt;/p&gt;

&lt;p&gt;After becoming familiar with the basics of how ASP.NET Core is used to build web applications and after taking tutorials, even simple ones such as Microsoft's &lt;a href="https://dotnet.microsoft.com/learn/web/aspnet-hello-world-tutorial/intro"&gt;"ASP.NET Tutorial - Hello World in 10 minutes"&lt;/a&gt;, the newcomer to ASP.NET Core should know enough to create a very early map that they can use to determine where to turn to next.&lt;/p&gt;

&lt;p&gt;All great journeys start small and somewhere. I hope this helps my contact who asked this question and helps you, too, reader!&lt;/p&gt;

&lt;p&gt;Till next time.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>csharp</category>
      <category>aspnet</category>
      <category>dotnet</category>
    </item>
  </channel>
</rss>
