Docker install and upload container

Installation Docker

  • Requirements for Mac (hardware requirements):

Mac hardware must be 2010 or later, need to support Memory Management Unit (the MMU) virtualizaiton . Included Extended Page Tables (EPT)
and Unrestricted Mode

You can use the following command to see if there is such support:

sysctl kern.hv_support
  • macOS system version 10.13 or later required
    if there is a problem, please download the latest version of Docker Desktop is compatible with the macOS

  • At least 4GB of RAM

Step 1:

Register an account, download the package

Note: Client installation docker, what appears as shown below, carrying out the steps of

Step 2:

First, open a Mac terminal and download a fun example

This repository contains everything you need to create your first container.

git clone https://github.com/docker/doodle.git

Step 3

Build and tag a Docker image

cd doodle/cheers2019 && docker build -t taiyangyixi2/cheers2019 .

After the command runs to completion

Step 4

Now let's run your first container.

Running the first container

docker run -it --rm taiyangyixi2/cheers2019

After the successful operation, the following figure appears

Step 5

Share your image on Docker Hub

Please enter your login password,

docker login && docker push taiyangyixi2/cheers2019

Running success! View own warehouse

Respositories

References:

Docker quick start

Install Docker Desktop on Mac

Guess you like

Origin www.cnblogs.com/zhichun/p/11872304.html