Turner  Crona

Turner Crona

1595743500

Performance Tips: Docker Desktop on Mac

Native NFS

A quick test reveals that we can see that we can extract ~100% performance improvement.

Host mount

/home # dd if=/dev/zero of=./output bs=8k count=10k; rm ./output
10240+0 records in
10240+0 records out
83886080 bytes (80.0MB) copied, 3.084522 seconds, 25.9MB/s

Host (NFS volume) mount

/home # dd if=/dev/zero of=./output bs=8k count=10k; rm ./output
10240+0 records in
10240+0 records out
83886080 bytes (80.0MB) copied, 1.426896 seconds, 56.1MB/s

If you prefer these tests can be performed locally on your machine using docker-mac-perf repo.

Thanks to this script created by Sean Handley we can quickly setup Native NFS on Mac OS. To enable NFS on your Mac run the below commands:

#docker-for-mac #docker #docker-volume

What is GEEK

Buddha Community

Performance Tips: Docker Desktop on Mac
Ray  Patel

Ray Patel

1619518440

top 30 Python Tips and Tricks for Beginners

Welcome to my Blog , In this article, you are going to learn the top 10 python tips and tricks.

1) swap two numbers.

2) Reversing a string in Python.

3) Create a single string from all the elements in list.

4) Chaining Of Comparison Operators.

5) Print The File Path Of Imported Modules.

6) Return Multiple Values From Functions.

7) Find The Most Frequent Value In A List.

8) Check The Memory Usage Of An Object.

#python #python hacks tricks #python learning tips #python programming tricks #python tips #python tips and tricks #python tips and tricks advanced #python tips and tricks for beginners #python tips tricks and techniques #python tutorial #tips and tricks in python #tips to learn python #top 30 python tips and tricks for beginners

Turner  Crona

Turner Crona

1595743500

Performance Tips: Docker Desktop on Mac

Native NFS

A quick test reveals that we can see that we can extract ~100% performance improvement.

Host mount

/home # dd if=/dev/zero of=./output bs=8k count=10k; rm ./output
10240+0 records in
10240+0 records out
83886080 bytes (80.0MB) copied, 3.084522 seconds, 25.9MB/s

Host (NFS volume) mount

/home # dd if=/dev/zero of=./output bs=8k count=10k; rm ./output
10240+0 records in
10240+0 records out
83886080 bytes (80.0MB) copied, 1.426896 seconds, 56.1MB/s

If you prefer these tests can be performed locally on your machine using docker-mac-perf repo.

Thanks to this script created by Sean Handley we can quickly setup Native NFS on Mac OS. To enable NFS on your Mac run the below commands:

#docker-for-mac #docker #docker-volume

Iliana  Welch

Iliana Welch

1595249460

Docker Explained: Docker Architecture | Docker Registries

Following the second video about Docker basics, in this video, I explain Docker architecture and explain the different building blocks of the docker engine; docker client, API, Docker Daemon. I also explain what a docker registry is and I finish the video with a demo explaining and illustrating how to use Docker hub

In this video lesson you will learn:

  • What is Docker Host
  • What is Docker Engine
  • Learn about Docker Architecture
  • Learn about Docker client and Docker Daemon
  • Docker Hub and Registries
  • Simple demo to understand using images from registries

#docker #docker hub #docker host #docker engine #docker architecture #api

How to Install, Run and Delete Applications Inside Docker Containers - Part 2

Following the previous Docker article, this tutorial will discuss how to save a Docker container into a new image, remove a container, and run an Nginx web server inside a container.

How To Run and Save a Docker Container

1. In this example, we will run and save an Ubuntu-based Docker container where the Nginx server will be installed. But before committing any changes to a container, first start the container with the below commands which updates and installs Nginx daemon into Ubuntu image:

# docker run ubuntu bash -c "apt-get -y update" 
# docker run ubuntu bash -c "apt-get -y install nginx" 

Install Nginx on Ubuntu Docker Container
Install Nginx on Ubuntu Docker Container

If you get error ‘E: Unable to locate package nginx‘, then you need to connect to a container with interactive CLI and install nginx as shown.

# docker run -it ubuntu bash
# apt install nginx
# exit

2. Next, after Nginx package is installed, issue the command docker ps -l to get the ID or name of the running container.

# docker ps -l

Find Docker Container ID Name
Find Docker Container ID Name

And apply changes by running the below command:

# docker commit 5976e4ae287c ubuntu-nginx

Here, 5976e4ae287c represents the container ID and ubuntu-nginx represents the name of the new image that has been saved with committed changes.

In order to view if the new image has been successfully created just run docker images command and a listing of all saved images will be shown.

# docker images

Docker Container Changes
Docker Container Changes

Chances are that the installation process inside the container finishes fast which leads to a non-running container (container is stopped). In this case the docker ps command won’t show any output because no container is running.

In order to be able to still get the container’s id run docker ps -a | head -3 to output the most recent containers and identify the container based on the command issued to create the container and the exited status.

#centos #docker #nginx #redhat #virtualization #centos tips #docker tips #nginx tips #rhel tips #virtualization

Install Docker and Learn Basic Container Manipulation in CentOS and RHEL 8/7 - Part 1

In this 4-article series, we will discuss Docker, which is an open-source lightweight virtualization tool that runs at top of Operating System level, allowing users to create, run and deploy applications, encapsulated into small containers.

This type of Linux containers are proven to be fast, portable, and secure. The processes that run in a Docker container are always isolated from the main host, preventing outside tampering.

Part 1Install Docker and Learn Basic Container Manipulation in CentOS and RHEL 8/7

Part 2:How to Deploy and Run Applications into Docker Containers on CentOS/RHEL 8/7

Part 3: Automatically Build and Configure Docker Images with Dockerfile on CentOS/RHEL 8/7

Part 4: How to Monitor Docker Containers in Linux

This tutorial provides a starting point on how to install Docker, create and run Docker containers on CentOS/RHEL 8/7, but barely scratches the surface of Docker.

Step 1: Install and Configure Docker

1. Earlier versions of Docker were called docker or docker-engine, if you have these installed, you must uninstall them before installing a newer docker-ce version.

# yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2. To install the latest version of the Docker Engine you need to set up the Docker repository and install the yum-utils package to enable Docker stable repository on the system.

# yum install -y yum-utils
# yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3. Now install the newer docker-ce version from the Docker repository and containerd manually, because due to some issues, Red Hat blocked the installation of containerd.io > 1.2.0-3.el7, which is a dependency of docker-ce.

# yum install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
# yum install docker-ce docker-ce-cli

#centos #docker #redhat #virtualization #centos tips #docker tips #rhel tips #virtualization