nsc docker login

Log into the Namespace Container Registry for use with Docker.

docker login automatically updates your default Docker config.json file with the Namespace credential helper and prints your Workspace registry endpoint.

The docker-credential-nsc credential helper is an executable binary that gets automatically installed alongside nsc. Docker-like tools call the helper binary to retrieve fresh credentials every time they access the specified registry.

Docker-like tools expect the credential helper to be available in your $PATH. You can check that the credential helper is in your path by running which docker-credential-nsc.

Usage

nsc docker login [--output_registry_to <file>] [--use_credential_helper]

Example

$ nsc docker login
 
You are now logged into your workspace container registry:
 
  nscr.io/8enum0hp1l5ii
 
Run your first build with:
 
  $ nsc build . --name test --push
 
Visit our docs for more details on Remote Builds:
 
  https://namespace.so/docs/solutions/docker-builders

Where 8enum0hp1l5ii is your workspace ID.

Now you can use the docker CLI to push/pull container images to Namespace Container Registry. For example:

docker push nscr.io/8enum0hp1l5ii/IMAGE_NAME

Options

--output_registry_to <file>

With this option nsc will write the Namespace Container Registry endpoint to the provided file.

--use_credential_helper

Use nsc's credential helper (docker-credential-nsc) instead of embedding the Namespace Container Registry credentials directly in your Docker config.json. Enabled by default (--use_credential_helper=true). Pass --use_credential_helper=false to embed the credentials directly instead.

Last updated