\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{sebtoga} \pdfinfo{ /Title (docker.pdf) /Creator (Cheatography) /Author (sebtoga) /Subject (Docker Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{2496ED} \definecolor{LightBackground}{HTML}{F1F8FD} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Docker Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{sebtoga} via \textcolor{DarkBackground}{\uline{cheatography.com/67657/cs/17909/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}sebtoga \\ \uline{cheatography.com/sebtoga} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 23rd November, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{imagenes}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{link="https://hub.docker.com/"\}\} https://hub.docker.com\{\{/link\}\}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Descargar la imagen}}` \{\{nl\}\} `{\bf{docker pull {\emph{nombre\_imagen:tag}} }}`} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Crear un Dockerfile}}` \{\{nl\}\} `{\bf{nano Dockerfile }}`} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Creación imagen\{\{nl\}\}punto (.) para llamar al Dockerfile}}`\{\{nl\}\} {\bf{ `docker build -t {\emph{nombre\_imagen\_result}} .` }}} \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Historial}}` \{\{nl\}\} {\bf{ ` docker history -H {\emph{nombre\_imagen:tag}} ` }}} \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Eliminar imagen}}` \{\{nl\}\} {\bf{`docker rm -fv {\emph{nombre\_imagen:tag}}`}}} \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Buscar imagenes}}` \{\{nl\}\} {\bf{`docker images | grep {\emph{nombre\_imagen:tag}}`}}} \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Estructura Dockerfile}}` \{\{nl\}\} {\bf{ `FROM {\emph{imagen:tag}}` \{\{nl\}\}`LABEL {\emph{descripcion}}` \{\{nl\}\} `RUN {\emph{comando\_install -y}}` \{\{nl\}\} `WORKDIR {\emph{dir\_trabajo}}` \{\{nl\}\}`USER {\emph{usuario\_ejecuta\_tarea}}` \{\{nl\}\} `COPY {\emph{carpeta\_archivo}} ruta/...` \{\{nl\}\} `ADD {\emph{archivo\_url}} ruta/...` \{\{nl\}\}`ENV {\emph{variable contenido}}` \{\{nl\}\}`VOLUME {\emph{ruta}}` \{\{nl\}\}`EXPOSE {\emph{puerto}}` \{\{nl\}\} `CMD {\emph{comando\_ejecutar}}` \{\{nl\}\} ` ` }}} \tn % Row Count 23 (+ 8) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Estructura dockerignore}}`\{\{nl\}\}{\bf{`{\emph{archivo\_ignorar}}`}}} \tn % Row Count 25 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Eliminar imagenes}}`\{\{nl\}\}{\bf{` docker rmi {\emph{imagen:tag}}`}}} \tn % Row Count 27 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Eliminar imagenes dangling}}`\{\{nl\}\}{\bf{` docker images -f dangling=true -q | xargs docker rmi`}}} \tn % Row Count 29 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Volúmenes}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Volumen persistente (datos bd)}}` \{\{nl\}\} {\bf{ `docker run -d {\emph{parametros}} -v /ruta\_loc:/ruta\_cont {\emph{imagen}}` }}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Volumen anónimos (datos bd)}}` \{\{nl\}\} {\bf{ `docker run -d {\emph{parametros}} -v /ruta\_loc {\emph{imagen}}` }}} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Volumen docker}}` \{\{nl\}\} {\bf{ `{\emph{docker volume ls}}` }}} \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Eliminar volumen docker (v)}}` \{\{nl\}\} {\bf{ `docker rm -fv {\emph{imagen}}` }}} \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Volumen nombrado}}` \{\{nl\}\} {\bf{ `docker volume create {\emph{nombre}}` }} \{\{nl\}\} `{\emph{Asignar volumen}}` \{\{nl\}\} {\bf{ `docker run -d -v nombre:/ruta {\emph{imagen}}` }}} \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Dangling volumes}}` \{\{nl\}\} {\bf{ `docker volume ls -f dangling=true`}}} \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Registry}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Creacion}}` \{\{nl\}\} {\bf{ `docker run -d -p 5000:5000 -{}-name registry -v \seqsplit{\$PWD/data:/var/lib/registry} registry:2` }}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Subir imagenes}}` \{\{nl\}\} {\bf{ `docker tag {\emph{nombre\_imagen:tag}} localhost:5000/{\emph{nombre\_imagen:tag}}` }}} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Subir imagen al registry }}` \{\{nl\}\} {\bf{ `docker push localhost:5000/{\emph{nombre\_imagen:tag}}` }}} \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Bajar imagen al registry }}` \{\{nl\}\} {\bf{ `docker pull localhost:5000/{\emph{nombre\_imagen:tag}}` }}} \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Compartir imagenes desde una red }}` {\bf{\{\{nl\}\}`vi \seqsplit{/lib/systemd/system/docker}.service`\{\{nl\}\}`ExcecStart=/usr/bin/dockerd -{}-insecure-registry IP:5000`\{\{nl\}\}`sudo systemctl daemon-reload` \{\{nl\}\}`docker stop registry`\{\{nl\}\} `sudo systemctl retart docker ` \{\{nl\}\}`docker start registry` \{\{nl\}\} `docker pull localhost:5000/{\emph{nombre\_imagen:tag}}` }}} \tn % Row Count 16 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Contenedores}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Listar un contenedor}}` \{\{nl\}\} {\bf{ ` docker ps ` }} \{\{nl\}\} {\bf{ ` docker ps -a` }} \{\{nl\}\} {\bf{ ` docker ps -q` }}\{\{nl\}\} {\bf{ ` docker ps -l` }}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Crear un contenedor}}` \{\{nl\}\} {\bf{ ` docker run ` }} `{\emph{-{}-help|less}}` \{\{nl\}\} {\bf{ ` docker run -d {\emph{imagen}}` }} `(-d){\emph{segundo\_plano}}` \{\{nl\}\} {\bf{ ` docker run -d -p ploc:pcont {\emph{imagen}}` }} `(-p){\emph{puerto}}`} \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Borrar un contenedor}}` \{\{nl\}\} {\bf{ ` docker rm -f {\emph{nombre}}` }}} \tn % Row Count 9 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Renombrar un contenedor}}` \{\{nl\}\} {\bf{ ` docker rename {\emph{nombre\_actual nombre\_nuevo}}` }}} \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Detener un contenedor}}` \{\{nl\}\} {\bf{ ` docker stop {\emph{nombre/id}}` }}} \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Iniciar un contenedor}}` \{\{nl\}\} {\bf{ ` docker start {\emph{nombre/id}}` }}} \tn % Row Count 15 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Reiniciar un contenedor}}` \{\{nl\}\} {\bf{ ` docker restart {\emph{nombre/id}}` }}} \tn % Row Count 17 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Shell un contenedor}}` \{\{nl\}\} {\bf{ ` docker exec {\emph{-u root}} -ti {\emph{nombre/id}} bash` }}} \tn % Row Count 19 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Eliminar todos los contenedores}}` \{\{nl\}\} {\bf{ ` docker ps -q | xargs docker rm -f` }}} \tn % Row Count 21 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Variables de entorno}}` \{\{nl\}\} {\bf{ ` docker run -e {\emph{"prueba1=1234"}} imagen` }}} \tn % Row Count 23 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Inspeccionar contenedor}}` \{\{nl\}\} {\bf{ ` docker inspect {\emph{imagen}}` }}} \tn % Row Count 25 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Logs en contenedor}}` \{\{nl\}\} {\bf{ ` docker logs -f {\emph{imagen}}` }}} \tn % Row Count 27 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Recursos en contenedor}}` \{\{nl\}\} {\bf{ ` docker stats {\emph{imagen}}` }}} \tn % Row Count 29 (+ 2) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Limitar recursos en contenedor}}` \{\{nl\}\} {\bf{ ` docker run -d -m "500mb/gb " {\emph{imagen}}` }}} \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Contenedores (cont)}} \tn % Row 14 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Cuantas CPU se tienen}}` \{\{nl\}\} {\bf{ ` grep "model name" /proc/cpuinfo | wc -l ` }}} \tn % Row Count 2 (+ 2) % Row 15 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Saber CPU en contenedor}}` \{\{nl\}\} {\bf{ `docker run -{}-help | grep cpu` }}} \tn % Row Count 4 (+ 2) % Row 16 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Restringir CPU en contenedor}}` \{\{nl\}\} {\bf{ ` docker run -d -m "1gb" -{}-cpuset-cpus 0-1 {\emph{imagen}}` }}} \tn % Row Count 6 (+ 2) % Row 17 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Enviar archivos en contenedor}}` \{\{nl\}\} {\bf{ `docker cp archivo {\emph{imagen:/ruta}}` }}} \tn % Row Count 8 (+ 2) % Row 18 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Extraer archivos en contenedor}}` \{\{nl\}\} {\bf{ `docker cp {\emph{imagen:/ruta}} /ruta\_local` }}} \tn % Row Count 10 (+ 2) % Row 19 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Docker commit}}` \{\{nl\}\} {\bf{ `docker commit contenedor {\emph{imagen\_resultante:tag}}` }}} \tn % Row Count 12 (+ 2) % Row 20 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Sobreescibir el CMD}}` \{\{nl\}\} {\bf{ `docker run -dti {\emph{imagen:tag}} cmd\_argumento` }}} \tn % Row Count 14 (+ 2) % Row 21 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Destruir contenedores auto}}` \{\{nl\}\} `{\emph{ejecución temporal (-{}-rm)}}` \{\{nl\}\} {\bf{ `docker run -{}-rm -ti {\emph{imagen:tag}}` }}} \tn % Row Count 17 (+ 3) % Row 22 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Document root}}`\{\{nl\}\} {\bf{ `var/lib/docker` }}} \tn % Row Count 18 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Docker Network}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Consultar la red docker}}` \{\{nl\}\} {\bf{ `docker network ls` }} \{\{nl\}\} `{\emph{Red por defecto}}` \{\{nl\}\} {\bf{ `docker network ls | grep bridge` }}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{red docker definida}}` \{\{nl\}\} {\bf{ `docker network create {\emph{nombre\_red}}` }} `(-{}-help)`} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Inspeccionar la red}}` \{\{nl\}\} {\bf{ `docker network inspect {\emph{nombre\_red}}` }}} \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Red}}` \{\{nl\}\} {\bf{ `docker run -{}-network {\emph{nombre\_red\_a\_conectar}} -d -{}-name test {\emph{imagen}}`}}} \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Ping}}` \{\{nl\}\} {\bf{ `docker exec {\emph{ontenedor}} bash -c "pin IP\_cont/nombre\_cont"`}}} \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Conectar diferentes redes}}` \{\{nl\}\} {\bf{ `docker network connect {\emph{nombre\_red1 nomb\_cont2}}`}}} \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Desconectar diferentes redes}}` \{\{nl\}\} {\bf{ `docker network disconnect {\emph{nombre\_red1 nomb\_cont2}}`}}} \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Eliminar redes}}` \{\{nl\}\} {\bf{ `docker network rm {\emph{nombre\_red}}`}}} \tn % Row Count 17 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Asignar ip a contenedor}}` \{\{nl\}\} {\bf{ `docker network create -{}-subnet IP/24 -{}-gateway IP -d bridge {\emph{nombre\_red}}`}}} \tn % Row Count 20 (+ 3) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Asignar ip a contenedor}}` \{\{nl\}\} {\bf{ `docker run -{}-network {\emph{nombre\_red}} -d -{}-name {\emph{cont1}} -ti centos`}}} \tn % Row Count 23 (+ 3) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Asignar ip a contenedor}}` \{\{nl\}\} {\bf{ `docker run -{}-network {\emph{nombre\_red}} -{}-ip {\emph{IP}} -d -{}-name {\emph{cont1}} -ti {\emph{imagen}}`}}} \tn % Row Count 26 (+ 3) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{La red de host}}` \{\{nl\}\} {\bf{ `docker run -{}-network host -d -{}-name {\emph{cont}} -ti {\emph{imagen}}`}}} \tn % Row Count 28 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Red None}}` \{\{nl\}\} {\bf{ `docker run -{}-network none -d -{}-name {\emph{cont}} -ti {\emph{imagen}}`}}} \tn % Row Count 30 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Compose}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Ejecución}}` \{\{nl\}\} {\bf{ `docker-compose` }}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Ejecutar contenedor}}` \{\{nl\}\} {\bf{ `docker-compose up -d` \{\{nl\}\} `docker-compose -f archivo.yml up -d` }}} \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Eliminar contenedor}}` \{\{nl\}\} {\bf{ `docker-compose down` }}} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Imagenes compose}}` \{\{nl\}\} {\bf{ `docker-compose build` }}} \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Personalizar nombre proyecto compose}}` \{\{nl\}\} {\bf{ `docker-compose -p nombre -f nombre.yml up -d` }}} \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{`{\emph{Nombre distinto docker-compose.yml }}` \{\{nl\}\} {\bf{ `docker-compose -f nombre\_archivo.yml` }}} \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{`{\emph{logs compose}}` \{\{nl\}\} {\bf{ `docker-compose logs -f` }}} \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}