1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-17 07:45:52 +01:00
verdaccio/website/translated_docs/es-ES/docker.md

166 lines
6.3 KiB
Markdown
Raw Normal View History

2017-12-16 13:29:25 +01:00
---
id: docker
title: Docker
---
<div class="docker-count">
![alt Docker Pulls Count](http://dockeri.co/image/verdaccio/verdaccio "Docker Pulls Count")
</div>
Para descargar la última [imagen de Docker](https://hub.docker.com/r/verdaccio/verdaccio/):
2017-12-16 13:29:25 +01:00
```bash
docker pull verdaccio/verdaccio
```
2017-12-16 13:29:25 +01:00
![Docker pull](/svg/docker_verdaccio.gif)
## Versiones con Etiquetas
2017-12-16 13:29:25 +01:00
Desde la versión `` puedes obtener imagenes de docker por [tag](https://hub.docker.com/r/verdaccio/verdaccio/tags/), de la siguiente manera:
2017-12-16 13:29:25 +01:00
Para usar una versión "major":
2017-12-16 13:29:25 +01:00
```bash
docker pull verdaccio/verdaccio:3
2017-12-16 13:29:25 +01:00
```
Para usar una versión "minor":
2017-12-16 13:29:25 +01:00
```bash
docker pull verdaccio/verdaccio:3.0
2017-12-16 13:29:25 +01:00
```
Para un (parche) especifico:
2017-12-16 13:29:25 +01:00
```bash
docker pull verdaccio/verdaccio:3.0.1
2017-12-16 13:29:25 +01:00
```
New Crowdin translations (#768) * New translations iis-server.md (Spanish) docs(website): new translations * New translations install.md (Spanish) docs(website): new translations * New translations en.json (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations ansible.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations uplinks.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations node-api.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations install.md (Spanish) docs(website): new translations * New translations reverse-proxy.md (Spanish) docs(website): new translations * New translations reverse-proxy.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations
2018-06-19 19:18:49 +02:00
Para el siguiente gran lanzamiento usando la versión `beta` (rama principal).
2017-12-16 13:29:25 +01:00
```bash
docker pull verdaccio/verdaccio:beta
```
> Si estas interesado en un listado de todos tags, [por favor visite el sitio web de Docker Hub](https://hub.docker.com/r/verdaccio/verdaccio/tags/).
## Ejecutando verdaccio usando Docker
2017-12-16 13:29:25 +01:00
Para ejecutar el contenedor docker:
2017-12-16 13:29:25 +01:00
```bash
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
```
El último argumento define cual imagen se usa. En la linea de abajo se descargará la ultima imagen desde Docker Hub, si no existía previamente.
2017-12-16 13:29:25 +01:00
New Crowdin translations (#768) * New translations iis-server.md (Spanish) docs(website): new translations * New translations install.md (Spanish) docs(website): new translations * New translations en.json (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations ansible.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations uplinks.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations node-api.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations install.md (Spanish) docs(website): new translations * New translations reverse-proxy.md (Spanish) docs(website): new translations * New translations reverse-proxy.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations
2018-06-19 19:18:49 +02:00
Si has [construido una imagen localmente](#build-your-own-docker-image) usa `verdaccio` como el último argumento.
2017-12-16 13:29:25 +01:00
You can use `-v` to bind mount `conf`, `storage` and `plugins` to the hosts filesystem:
2017-12-16 13:29:25 +01:00
```bash
V_PATH=/path/for/verdaccio; docker run -it --rm --name verdaccio -p 4873:4873 \
-v $V_PATH/conf:/verdaccio/conf \
-v $V_PATH/storage:/verdaccio/storage \
-v $V_PATH/plugins:/verdaccio/plugins \
2017-12-16 13:29:25 +01:00
verdaccio/verdaccio
```
docs: new Crowdin translations (#770) * New translations windows.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations uplinks.md (Spanish) docs(website): new translations * New translations uplinks.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations reverse-proxy.md (Spanish) docs(website): new translations * New translations uplinks.md (Spanish) docs(website): new translations * New translations chef.md (Spanish) docs(website): new translations * New translations chef.md (Spanish) docs(website): new translations * New translations notifications.md (Spanish) docs(website): new translations * New translations notifications.md (Spanish) docs(website): new translations * New translations notifications.md (Spanish) docs(website): new translations * New translations notifications.md (Spanish) docs(website): new translations * New translations notifications.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations chef.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations test.md (Spanish) docs(website): new translations * New translations packages.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations packages.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations packages.md (Spanish) docs(website): new translations * New translations packages.md (Spanish) docs(website): new translations * New translations packages.md (Spanish) docs(website): new translations * New translations packages.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations uplinks.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations node-api.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations install.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations use-cases.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations use-cases.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations use-cases.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations use-cases.md (Spanish) docs(website): new translations * New translations use-cases.md (Spanish) docs(website): new translations * New translations use-cases.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations plugins.md (Spanish) docs(website): new translations * New translations repositories.md (Spanish) docs(website): new translations
2018-06-20 07:46:52 +02:00
> Note: Verdaccio runs as a non-root user (uid=100, gid=101) inside the container, if you use bind mount to override default, you need to make sure the mount directory is assigned to the right user. En el ejemplo de arriba, necesitas ejecutar `sudo chown -R 100:101 /opt/verdaccio` de lo contrario, obtendrás errores de permiso en tiempo de ejecución. [Usar el volumen docker](https://docs.docker.com/storage/volumes/) es recomendado antes que usar el montaje de unión.
### Plugins
2017-12-16 13:29:25 +01:00
Plugins can be installed in a separate directory and mounted using Docker or Kubernetes, however make sure you build plugins with native dependencies using the same base image as the Verdaccio Dockerfile.
2017-12-16 13:29:25 +01:00
### Docker and custom port configuration
2017-12-16 13:29:25 +01:00
Any `host:port` configured in `conf/config.yaml` under `listen` is currently ignored when using docker.
2017-12-16 13:29:25 +01:00
If you want to reach verdaccio docker instance under different port, lets say `5000` in your `docker run` command replace `-p 4873:4873` with `-p 5000:4873`.
In case you need to specify which port to listen to **in the docker container**, since version 2.?.? you can do so by providing additional arguments to `docker run`: `--env PORT=5000` This changes which port the docker container exposes and the port verdaccio listens to.
Of course the numbers you give to `-p` paremeter need to match, so assuming you want them to all be the same this is what you could copy, paste and adopt:
2017-12-16 13:29:25 +01:00
```bash
PORT=5000; docker run -it --rm --name verdaccio \
--env PORT -p $PORT:$PORT
verdaccio/verdaccio
```
### Using HTTPS with Docker
2017-12-16 13:29:25 +01:00
You can configure the protocol verdaccio is going to listen on, similarly to the port configuration. You have to overwrite the default value("http") of the `PROTOCOL` environment variable to "https", after you specified the certificates in the config.yaml.
2017-12-16 13:29:25 +01:00
```bash
PROTOCOL=https; docker run -it --rm --name verdaccio \
--env PROTOCOL -p 4873:4873
verdaccio/verdaccio
```
### Using docker-compose
2017-12-16 13:29:25 +01:00
New Crowdin translations (#768) * New translations iis-server.md (Spanish) docs(website): new translations * New translations install.md (Spanish) docs(website): new translations * New translations en.json (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations ansible.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations uplinks.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations node-api.md (Spanish) docs(website): new translations * New translations protect-your-dependencies.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations docker.md (Spanish) docs(website): new translations * New translations install.md (Spanish) docs(website): new translations * New translations reverse-proxy.md (Spanish) docs(website): new translations * New translations reverse-proxy.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations ssl.md (Spanish) docs(website): new translations * New translations auth.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations config.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations ci.md (Spanish) docs(website): new translations * New translations dev-plugins.md (Spanish) docs(website): new translations * New translations logger.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations iis-server.md (Spanish) docs(website): new translations * New translations windows.md (Spanish) docs(website): new translations
2018-06-19 19:18:49 +02:00
1. Obtén la última versión de [docker-compose](https://github.com/docker/compose).
2. Construye y ejecuta el contenedor:
2017-12-16 13:29:25 +01:00
```bash
$ docker-compose up --build
```
You can set the port to use (for both container and host) by prefixing the above command with `PORT=5000`.
2017-12-16 13:29:25 +01:00
Docker will generate a named volume in which to store persistent application data. You can use `docker inspect` or `docker volume inspect` to reveal the physical location of the volume and edit the configuration, such as:
2017-12-16 13:29:25 +01:00
$ docker volume inspect verdaccio_verdaccio
[
{
"Name": "verdaccio_verdaccio",
"Driver": "local",
"Mountpoint": "/var/lib/docker/volumes/verdaccio_verdaccio/_data",
"Labels": null,
"Scope": "local"
}
]
## Construye tu propia imagen de Docker
2017-12-16 13:29:25 +01:00
```bash
docker build -t verdaccio .
```
There is also an npm script for building the docker image, so you can also do:
2017-12-16 13:29:25 +01:00
```bash
npm run build:docker
```
Note: The first build takes some minutes to build because it needs to run `npm install`, and it will take that long again whenever you change any file that is not listed in `.dockerignore`.
2017-12-16 13:29:25 +01:00
If you want to use the docker image on a rpi or a compatible device there is also a dockerfile available. To build the docker image for raspberry pi execute:
2017-12-16 13:29:25 +01:00
```bash
npm run build:docker:rpi
```
Please note that for any of the above docker commands you need to have docker installed on your machine and the docker executable should be available on your `$PATH`.
2017-12-16 13:29:25 +01:00
## Ejemplos con Docker
2017-12-16 13:29:25 +01:00
There is a separate repository that hosts multiple configurations to compose Docker images with `verdaccio`, for instance, as reverse proxy:
2017-12-16 13:29:25 +01:00
<https://github.com/verdaccio/docker-examples>
## Imágenes de Docker Personalizadas
* [docker-verdaccio-gitlab](https://github.com/snics/docker-verdaccio-gitlab)
* [docker-verdaccio](https://github.com/deployable/docker-verdaccio)
* [docker-verdaccio-s3](https://github.com/asynchrony/docker-verdaccio-s3) Private NPM container that can backup to s3
* [docker-verdaccio-ldap](https://github.com/snadn/docker-verdaccio-ldap)
* [verdaccio-ldap](https://github.com/nathantreid/verdaccio-ldap)
* [verdaccio-compose-local-bridge](https://github.com/shingtoli/verdaccio-compose-local-bridge)
* [docker-verdaccio](https://github.com/Global-Solutions/docker-verdaccio)
* [verdaccio-docker](https://github.com/idahobean/verdaccio-docker)
* [verdaccio-server](https://github.com/andru255/verdaccio-server)
* [coldrye-debian-verdaccio](https://github.com/coldrye-docker/coldrye-debian-verdaccio) imagen de docker que ejecuta verdaccio desde coldrye-debian-nodejs.