Skip to content

Commit

Permalink
docs: updated docker credentials management (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
jroper authored Nov 26, 2024
1 parent ffdba6c commit 61eedc6
Showing 1 changed file with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ To use an external container registry with Akka, you need to give Akka permissio
[NOTE]
If the container registry you're using does not require authentication, you don't have to add any credentials. Akka will automatically pull the container image using the URL you use to deploy your service.

External container registries are configured by creating an Akka secret, and then configuring your Akka project to use that secret as docker registry credentials. The secret, and project configuration, are both managed by the `akka docker` command.

There are four parameters you need to specify, depending on the registry you want to connect to:

- Server: The first part of the container image URL. For example, if your image is at `us.gcr.io/my-project/my-image`, the server is `\https://us.gcr.io` (_mandatory_).
Expand All @@ -28,6 +30,12 @@ akka docker add-credentials --docker-server <my-server> \ <1>
<3> Email
<4> Password

If you wish to specify the name of the secret that you want to use, that can be done using the `--secret-name` parameter. By default, if not specified, the name of the secret will be `docker-credentials`.

== Updating credentials

The `add-credentials` command can also be used to update existing credentials. Simply ensure that the `--secret-name` argument matches the secret name used when the credentials were added, if it was specified then.

== Listing credentials

To list all container registry credentials for your Akka project, you can use the Akka CLI or the Akka Console. For security purposes, neither the CLI nor the Console will show the password of the configured registry.
Expand All @@ -42,19 +50,26 @@ akka docker list-credentials
The results should look something like:

----
ID SERVER USERNAME EMAIL
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx https://us.gcr.io _json_key [email protected]
NAME STATUS SERVER EMAIL USERNAME
docker-credentials OK https://us.gcr.io [email protected] _json_key
----

== Removing credentials

To remove container registry credentials from your Akka project, you can use the Akka CLI or the Akka Console.

Use the 'ID' returned from the `akka docker list-credentials` command as the `ID` in the `akka docker delete-credentials` command:
If you specified a `--secret-name` when creating the credentials, this is the name that you must pass to the command to remove. Otherwise, you should pass the default secret name of `docker-credentials`. The name of the secret appears in the `NAME` column when listing credentials.

[source, command line]
----
akka docker delete-credentials docker-credentials
----

Note that this will only remove the credentials from the configuration for the project, it will not delete the underlying secret. To delete the secret as well, run:

[source, command line]
----
akka docker delete-credentials <credentials-id>
akka secrets delete docker-credentials
----

== Supported external registries
Expand Down

0 comments on commit 61eedc6

Please sign in to comment.