Skip to content

Commit

Permalink
[Docs] Docker docs improvements; remove breadcrumbs. (#3370)
Browse files Browse the repository at this point in the history
* [Docs] Docker docs improvements; remove breadcrumbs.

* Update docs/source/examples/docker-containers.rst

Co-authored-by: Romil Bhardwaj <[email protected]>

* Update docs/source/examples/docker-containers.rst

Co-authored-by: Romil Bhardwaj <[email protected]>

---------

Co-authored-by: Romil Bhardwaj <[email protected]>
  • Loading branch information
concretevitamin and romilbhardwaj authored Mar 27, 2024
1 parent de2d63d commit 49fd208
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def render_svg_logo(path):
'footer_center': [],
'footer_end': [],
'header_links_before_dropdown': 6,
'article_header_start': None, # Disable breadcrumbs.
}

html_context = {
Expand Down
43 changes: 32 additions & 11 deletions docs/source/examples/docker-containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,43 @@ Private Registries
When using this mode, to access Docker images hosted on private registries,
you can provide the registry authentication details using :ref:`task environment variables <env-vars>`:

.. code-block:: yaml
.. tab-set::

# ecr_private_docker.yaml
resources:
image_id: docker:<your-user-id>.dkr.ecr.us-east-1.amazonaws.com/<your-private-image>:<tag>
# the following shorthand is also supported:
# image_id: docker:<your-private-image>:<tag>
.. tab-item:: Docker Hub
:sync: docker-hub-tab

.. code-block:: yaml
resources:
image_id: docker:<user>/<your-docker-hub-repo>:<tag>
envs:
# Values used in: docker login -u <user> -p <password> <registry server>
SKYPILOT_DOCKER_USERNAME: <user>
SKYPILOT_DOCKER_PASSWORD: <password>
SKYPILOT_DOCKER_SERVER: docker.io
.. tab-item:: Cloud Provider Registry (e.g., ECR)
:sync: csp-registry-tab

.. code-block:: yaml
resources:
image_id: docker:<your-ecr-repo>:<tag>
envs:
SKYPILOT_DOCKER_USERNAME: AWS
# SKYPILOT_DOCKER_PASSWORD: <password>
SKYPILOT_DOCKER_SERVER: <your-user-id>.dkr.ecr.us-east-1.amazonaws.com
envs:
# Values used in: docker login -u <user> -p <password> <registry server>
SKYPILOT_DOCKER_USERNAME: AWS
SKYPILOT_DOCKER_PASSWORD: <password>
SKYPILOT_DOCKER_SERVER: <your-user-id>.dkr.ecr.<region>.amazonaws.com
We suggest setting the :code:`SKYPILOT_DOCKER_PASSWORD` environment variable through the CLI (see :ref:`passing secrets <passing-secrets>`):

.. code-block:: console
$ # Docker Hub password:
$ export SKYPILOT_DOCKER_PASSWORD=...
$ # Or cloud registry password:
$ export SKYPILOT_DOCKER_PASSWORD=$(aws ecr get-login-password --region us-east-1)
$ sky launch ecr_private_docker.yaml --env SKYPILOT_DOCKER_PASSWORD
$ # Pass --env:
$ sky launch task.yaml --env SKYPILOT_DOCKER_PASSWORD
2 changes: 1 addition & 1 deletion sky/provision/provisioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def _post_provision_setup(
docker_config = config_from_yaml.get('docker', {})
if docker_config:
status.update(
'[bold cyan]Lauching - Initializing docker container[/]')
'[bold cyan]Launching - Initializing docker container[/]')
docker_user = instance_setup.initialize_docker(
cluster_name.name_on_cloud,
docker_config=docker_config,
Expand Down

0 comments on commit 49fd208

Please sign in to comment.