Container. If we don't use the optional name argument in the docker run command, Docker assigns a random name. RUN apt-get update && apt-get install -y vim Unless you absolutely need to continue using it, we recommend that you use user-defined networks to facilitate communication between two containers instead of using --link.One feature that user-defined networks do not support that Next, well define the volume mapping. To install within your Docker container you can run command. Estimated reading time: 138 minutes. Here's the TL;DR version: RUN apt-get update \ && apt-get install -y sudo RUN adduser --disabled-password --gecos '' docker RUN adduser docker sudo RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' . Top-level keys that define a section in the configuration file such as build, deploy, depends_on, networks, and so on, are listed with the options that support them as sub-topics.This maps to the :