Skip to content

Commit 5b688d1

Browse files
committed
fix about bind mount in 12b
1 parent fcabb6a commit 5b688d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/content/12/en/part12b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ This file will initialize the database with a user and a few todos. Next, we nee
425425

426426
We could create a new image FROM mongo and COPY the file inside, or we can use a [bind mount](https://docs.docker.com/storage/bind-mounts/) to mount the file <i>mongo-init.js</i> to the container. Let's do the latter.
427427

428-
Bind mount is the act of binding a file (or directory) on the host machine to a file (or directory) in the container. A bind mount is done by adding a _-v_ flag with _container run_. The syntax is _-v FILE-IN-HOST:FILE-IN-CONTAINER_. Since we already learned about Docker Compose let's skip that. The bind mount is declared under key <i>volumes</i> in docker-compose.dev.yml. Otherwise the format is the same, first host and then container:
428+
Bind mount is the act of binding a file (or directory) on the host machine to a file (or directory) in the container. A bind mount is done by adding a _-v_ flag with _container run_. The syntax is _-v FILE-IN-HOST:FILE-IN-CONTAINER_. Since we already learned about Docker Compose let's skip that. The bind mount is declared under key <i>volumes</i> in _docker-compose.dev.yml_. Otherwise the format is the same, first host and then container:
429429

430430
```yml
431431
mongo:

src/content/12/es/part12b.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ Este archivo inicializará la base de datos con un usuario y algunas tareas. A c
425425

426426
Podríamos crear una nueva imagen DESDE mongo y COPIAR el archivo, o podemos usar un <i>bind mount</i> para montar el archivo <i>mongo-init.js</i> en el contenedor. Hagamos esto último.
427427

428-
Bind mount es el acto de vincular un archivo en la máquina host a un archivo en el contenedor. Podríamos agregar un indicador _-v_ con _container run_. La sintaxis es _-v ARCHIVO-EN-HOST:ARCHIVO-EN-CONTENEDOR_. Como ya aprendimos sobre Docker Compose, omitámoslo. El montaje de enlace se declara bajo la clave <i>volumes</i> en docker-compose. De lo contrario, el formato es el mismo, primero host y luego contenedor:
428+
Bind mount es el acto de vincular un archivo (o directorio) en la máquina host a un archivo (o directorio) en el contenedor. Podríamos agregar una bandera _-v_ con _container run_. La sintaxis es _-v ARCHIVO-EN-HOST:ARCHIVO-EN-CONTENEDOR_. Como ya aprendimos sobre Docker Compose, omitámoslo. El bind mount se declara bajo la clave <i>volumes</i> en _docker-compose.dev.yml_. De lo contrario, el formato es el mismo, primero host y luego contenedor:
429429

430430
```yml
431431
mongo:

0 commit comments

Comments
 (0)