0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00
verdaccio/website/translated_docs/ru/docker.md
verdacciobot 8338d9be22 docs(website): new translations
* New translations dev-plugins.md (Vietnamese)
docs(website): new translations

* New translations dev-plugins.md (Vietnamese)
docs(website): new translations

* New translations dev-plugins.md (Vietnamese)
docs(website): new translations

* New translations dev-plugins.md (Vietnamese)
docs(website): new translations

* New translations dev-plugins.md (Vietnamese)
docs(website): new translations

* New translations dev-plugins.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations en.json (Russian)
docs(website): new translations

* New translations auth.md (Russian)
docs(website): new translations

* New translations en.json (Russian)
docs(website): new translations

* New translations auth.md (Russian)
docs(website): new translations

* New translations en.json (Russian)
docs(website): new translations

* New translations en.json (Russian)
docs(website): new translations

* New translations install.md (Russian)
docs(website): new translations

* New translations en.json (Russian)
docs(website): new translations

* New translations ansible.md (Polish)
docs(website): new translations

* New translations auth.md (Polish)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations auth.md (Russian)
docs(website): new translations

* New translations auth.md (Russian)
docs(website): new translations

* New translations auth.md (Russian)
docs(website): new translations

* New translations auth.md (Russian)
docs(website): new translations

* New translations build.md (Russian)
docs(website): new translations

* New translations build.md (Russian)
docs(website): new translations

* New translations ci.md (Russian)
docs(website): new translations

* New translations chef.md (Russian)
docs(website): new translations

* New translations cli.md (Russian)
docs(website): new translations

* New translations ci.md (Russian)
docs(website): new translations

* New translations cli.md (Russian)
docs(website): new translations

* New translations config.md (Russian)
docs(website): new translations

* New translations config.md (Russian)
docs(website): new translations

* New translations config.md (Russian)
docs(website): new translations

* New translations config.md (Russian)
docs(website): new translations

* New translations config.md (Russian)
docs(website): new translations

* New translations auth.md (Russian)
docs(website): new translations

* New translations en.json (Russian)
docs(website): new translations

* New translations contributing.md (Russian)
docs(website): new translations

* New translations contributing.md (Russian)
docs(website): new translations

* New translations contributing.md (Russian)
docs(website): new translations

* New translations contributing.md (Russian)
docs(website): new translations

* New translations contributing.md (Russian)
docs(website): new translations

* New translations contributing.md (Russian)
docs(website): new translations

* New translations contributing.md (Russian)
docs(website): new translations

* New translations dev-plugins.md (Russian)
docs(website): new translations

* New translations dev-plugins.md (Russian)
docs(website): new translations

* New translations dev-plugins.md (Russian)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations contributing.md (Vietnamese)
docs(website): new translations

* New translations contributing.md (Vietnamese)
docs(website): new translations

* New translations dev-plugins.md (Vietnamese)
docs(website): new translations

* New translations iis-server.md (Vietnamese)
docs(website): new translations

* New translations iis-server.md (Vietnamese)
docs(website): new translations

* New translations iis-server.md (Vietnamese)
docs(website): new translations

* New translations iis-server.md (Vietnamese)
docs(website): new translations

* New translations iis-server.md (Vietnamese)
docs(website): new translations

* New translations iis-server.md (Vietnamese)
docs(website): new translations

* New translations install.md (Vietnamese)
docs(website): new translations

* New translations install.md (Vietnamese)
docs(website): new translations

* New translations install.md (Vietnamese)
docs(website): new translations

* New translations kubernetes.md (Vietnamese)
docs(website): new translations

* New translations kubernetes.md (Vietnamese)
docs(website): new translations

* New translations auth.md (Polish)
docs(website): new translations

* New translations cli.md (Polish)
docs(website): new translations

* New translations config.md (Polish)
docs(website): new translations

* New translations contributing.md (Polish)
docs(website): new translations

* New translations dev-plugins.md (Polish)
docs(website): new translations

* New translations dev-plugins.md (Polish)
docs(website): new translations

* New translations notifications.md (Polish)
docs(website): new translations

* New translations protect-your-dependencies.md (Polish)
docs(website): new translations

* New translations en.json (Polish)
docs(website): new translations

* New translations en.json (Polish)
docs(website): new translations

* New translations puppet.md (Polish)
docs(website): new translations

* New translations en.json (Polish)
docs(website): new translations

* New translations install.md (Vietnamese)
docs(website): new translations

* New translations install.md (Italian)
docs(website): new translations

* New translations install.md (Polish)
docs(website): new translations

* New translations install.md (Russian)
docs(website): new translations

* New translations install.md (Korean)
docs(website): new translations

* New translations install.md (Portuguese)
docs(website): new translations

* New translations install.md (Spanish)
docs(website): new translations

* New translations install.md (Arabic)
docs(website): new translations

* New translations install.md (Chinese Simplified)
docs(website): new translations

* New translations install.md (Portuguese, Brazilian)
docs(website): new translations

* New translations install.md (Japanese)
docs(website): new translations

* New translations install.md (French)
docs(website): new translations

* New translations install.md (German)
docs(website): new translations

* New translations kubernetes.md (Vietnamese)
docs(website): new translations

* New translations kubernetes.md (Vietnamese)
docs(website): new translations

* New translations logger.md (Vietnamese)
docs(website): new translations

* New translations logger.md (Vietnamese)
docs(website): new translations

* New translations node-api.md (Vietnamese)
docs(website): new translations

* New translations dev-plugins.md (Russian)
docs(website): new translations

* New translations dev-plugins.md (Russian)
docs(website): new translations

* New translations dev-plugins.md (Russian)
docs(website): new translations

* New translations docker.md (Russian)
docs(website): new translations

* New translations docker.md (Russian)
docs(website): new translations

* New translations docker.md (Russian)
docs(website): new translations

* New translations docker.md (Vietnamese)
docs(website): new translations

* New translations en.json (Vietnamese)
docs(website): new translations

* New translations en.json (Italian)
docs(website): new translations

* New translations en.json (Polish)
docs(website): new translations

* New translations en.json (Portuguese)
docs(website): new translations

* New translations en.json (Russian)
docs(website): new translations

* New translations en.json (Korean)
docs(website): new translations

* New translations en.json (Portuguese, Brazilian)
docs(website): new translations

* New translations en.json (Spanish)
docs(website): new translations

* New translations en.json (Chinese Simplified)
docs(website): new translations

* New translations en.json (German)
docs(website): new translations

* New translations en.json (Japanese)
docs(website): new translations

* New translations en.json (Arabic)
docs(website): new translations

* New translations en.json (French)
docs(website): new translations
2018-08-24 09:23:30 +02:00

7.4 KiB
Raw Blame History

id title
docker Docker
![alt Количество скачиваний](http://dockeri.co/image/verdaccio/verdaccio "Количество скачиваний")

Для скачивания последней версии Docker образа:

docker pull verdaccio/verdaccio

Docker pull

Версии с меткой

Начиная с версии v2.x вы можете скачать Docker образ тег, так:

Для базовых версий:

docker pull verdaccio/verdaccio:3

Для минорной версии:

docker pull verdaccio/verdaccio:3.0

Конкретная версия (патч):

docker pull verdaccio/verdaccio:3.0.1

Следующая базовая версия, при помощи тега beta (ветка master).

docker pull verdaccio/verdaccio:beta

Если вас интересует весь список тегов, посетите нашу страницу на сайте Docker Hub.

Запуск verdaccio с использованием Docker

Запуск Docker контейнера:

docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio

Последний аргумент указывает на то, какой именно образ нужно использовать. Эта команда скачает последний образ из Docker Hub, если вы ещё не сделали этого ранее.

Если этот образ у вас уже скачан используйте verdaccio в качестве последнего аргумента.

Вы можете использовать -v для того, что бы примонтировать каталоги conf, storage и plugins к основной (host) файловой системе:

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 \
  verdaccio/verdaccio

Примечание: Verdaccio, внутри контейнера, запускается не из под root (uid=100, gid=101), если вы используете монтирование каталогов, вам необходимо убедиться, что у пользователя, из контейнера, будет доступ к этим каталогам. В примере выше, вам нужно выполнить sudo chown -R 100:101 /opt/verdaccio иначе вы получите ошибку прав доступа во время запуска контейнера. Рекомендуется использовать Docker разделы при монтировании каталогов.

Плагины

Плагины могут быть установлены в отдельную директорию и смонтированы с использованием Docker или Kubernetes. Однако вам нужно убедиться, что вы используете встроенные плагины с родными зависимостями, использующими такой же базовый образ как и в Verdaccio Dockerfile.

Docker и конфигурация пользовательского порта

Any host:port configured in conf/config.yaml under listen is currently ignored when using docker.

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:

PORT=5000; docker run -it --rm --name verdaccio \
  --env PORT -p $PORT:$PORT
  verdaccio/verdaccio

Using HTTPS with Docker

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.

PROTOCOL=https; docker run -it --rm --name verdaccio \
  --env PROTOCOL -p 4873:4873
  verdaccio/verdaccio

Using docker-compose

  1. Get the latest version of docker-compose.
  2. Build and run the container:
$ docker-compose up --build

You can set the port to use (for both container and host) by prefixing the above command with PORT=5000.

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:

$ docker volume inspect verdaccio_verdaccio
[
    {
        "Name": "verdaccio_verdaccio",
        "Driver": "local",
        "Mountpoint": "/var/lib/docker/volumes/verdaccio_verdaccio/_data",
        "Labels": null,
        "Scope": "local"
    }
]

Build your own Docker image

docker build -t verdaccio .

There is also an npm script for building the docker image, so you can also do:

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.

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:

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.

Docker Examples

There is a separate repository that hosts multiple configurations to compose Docker images with verdaccio, for instance, as reverse proxy:

https://github.com/verdaccio/docker-examples

Docker Custom Builds