Output of apt-cache policy docker-ce

docker-ce:
  Installed: (none)
  Candidate: 5:19.03.9~3-0~ubuntu-focal
  Version table:
     5:19.03.9~3-0~ubuntu-focal 500
        500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
As an example, let’s run a container using the latest image of Ubuntu. The combination of the -i and -t switches gives you interactive shell access into the container:

docker run -it ubuntu
Create a new docker-compose.yml file at the root of the application folder:

nano docker-compose.yml
The container will start, and you can use docker ps to see its status:

OutputCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
1c08a7a0d0e4        ubuntu              "/bin/bash"         3 minutes ago       Up 5 seconds                            quizzical_mcnulty
This installs Node.js in the container from the official Ubuntu repository. When the installation finishes, verify that Node.js is installed:

node -v
Your command prompt should change to reflect the fact that you’re now working inside the container and should take this form:

Outputroot@d9b100f2f636:/#
Now you can run any command inside the container. For example, let’s update the package database inside the container. You don’t need to prefix any command with sudo, because you’re operating inside the container as the root user:

apt update
Then install any application in it. Let’s install Node.js:

apt install nodejs
You’ll see the version number displayed in your terminal:

Outputv10.19.0

Recommend

How To Install and Use Docker on Ubuntu 20.04 Step 1 — Installing Docker

Использование Visual Studio Code для удаленной разработки с помощью плагина Remote-SSH Шаг 3 — Выполнение кода на удаленном сервере

Использование Visual Studio Code для удаленной разработки с помощью плагина Remote-SSH Шаг 2 — Настройка плагина Remote-SSH и подключение к серверу

Built-in Python 3 Functions for Working with Numbers Prerequisites Still looking for an answer?

Built-in Python 3 Functions for Working with Numbers Calculating a Sum

Built-in Python 3 Functions for Working with Numbers Rounding Numbers

Built-in Python 3 Functions for Working with Numbers Power

Built-in Python 3 Functions for Working with Numbers Absolute Value Finding the Quotient and Remainder in One Function

Built-in Python 3 Functions for Working with Numbers Absolute Value

Cómo indexar, dividir y manipular cadenas en JavaScript Búsqueda y sustitución de valores de cadenas

Cómo indexar, dividir y manipular cadenas en JavaScript Recorte de espacios en blanco

Cómo indexar, dividir y manipular cadenas en JavaScript División de cadenas

Cómo indexar, dividir y manipular cadenas en JavaScript Conversión a mayúsculas o minúsculas

Cómo indexar, dividir y manipular cadenas en JavaScript Búsqueda de la longitud de una cadena

Cómo indexar, dividir y manipular cadenas en JavaScript Acceso a los caracteres

Cómo indexar, dividir y manipular cadenas en JavaScript Las primitivas de cadena y los objetos String

How To Set Up Zoho Mail with a Custom Domain Managed by DigitalOcean DNS Conclusion Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

Cómo instalar y proteger Redis en Ubuntu 18.04 Paso 5 - Renombrar comandos peligrosos

Cómo instalar y proteger Redis en Ubuntu 18.04 Paso 4 - Configurar un contraseña de Redis

Cómo instalar y proteger Redis en Ubuntu 18.04 Paso 3: Vinculación a localhost

Cómo instalar y proteger Redis en Ubuntu 18.04 Paso 2: Pruebas en Redis

Cómo instalar y proteger Redis en Ubuntu 18.04 Paso 1: Instalación y configuración de Redis

Securing Communications in a Three-tier Rails Application Using SSH Tunnels Step 8 — Configuring Nginx