Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Refactor ServiceConfig to be more informative #2221

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ lerna-debug.log
# contains several libraries that get shipped
yarn.lock
package.json
package-lock.json
package-lock.json
43 changes: 43 additions & 0 deletions docs/docs/api-reference/starlark-reference/image-spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: ImageSpec
sidebar_label: ImageSpec
---

The `ImageSpec` object constructor allows for providing detailed information about a container image for use in the [`ServiceConfig.image`](./service-config.md) property. It is most commonly used when pulling an image from a non-Dockerhub container repository.

Signature
---------

```
ImageSpec(
name,
registry = "http://hub.docker.com",
username = None,
password = None,
)
```

| Property | Description |
| --- | --- |
| **name**<br/>_string_ | The name of the container image that should be used. |
| **registry**<br/>_string_ | The registry that the container should be pulled from. |
| **username**<br/>_string_ | The username that will be used for connecting to the registry when pulling the image. |
| **password**<br/>_string_ | The password that will be used for connecting to the registry when pulling the image. |

Examples
--------
Starting a service called `my-service` from `my.registry.io` using a custom username and password:

```python
plan.add_service(
name = "my-service",
config = ServiceConfig(
image = ImageSpec(
name = "my.registry.io/some-org/some-image",
registry = "http://my.registry.io/",
username = "registry-user",
password = "SomePassword1!",
)
)
)
```
Loading
Loading