<commit_before>docker/migrator
=================

Tool to migrate Docker images from Docker Hub or v1 registry to a v2 registry including Amazon EC2 Container Registry (ECR) 

https://hub.docker.com/r/docker/migrator/

## Usage

```
docker run -it \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e V1_REGISTRY=v1.registry.fqdn \
    -e V2_REGISTRY=v2.registry.fqdn \
    docker/migrator
```

### Environment Variables
The following environment variables can be set:

#### Required

  * `V1_REGISTRY` - DNS hostname of your v1 registry or Docker Hub (Do not include `https://`)
    * If migrating images from Docker Hub, use `docker.io`
  * `V2_REGISTRY` - DNS hostname of your v2 registry (Do not include `https://`)

#### Optional

  * `AWS_ACCESS_KEY` - AWS Access Key supplied as either an environment variable or as a part of your credentials file.
  * `AWS_SECRET_ACCESS_KEY` - AWS Secret Access Key supplied as either an environment variable or as a part of your credentials file.
  * `ERROR_ACTION` - Sets the default action on error for pushes and pulls
    * `prompt` - (_Default_) Prompt for user input as to what action to take on error
    * `retry` - Retry the failed action on error (may cause infinite loop of failure)
    * `skip` - Log the error and continue migration on error
    * `abort` - Abort the migration on error
  * `USER_PROMPT` - Sets the default action for user prompts (non-error)
    * `true` - (_Default_) Prompts user for input/validation
    * `false` - Skips user prompt and automatically proceeds
  * `NO_LOGIN`
    * `true` - Skips `docker login` for both the v1 and v2 registries
    * `false` - (_Default_) Prompts user to login to the v1 and v2 registries
  * `V1_NO_LOGIN`
    * `true` - Skips `docker login` for the v1 registry<commit_msg>Updated README for MIGRATION_INCREMENT<commit_after>docker/migrator
=================

Tool to migrate Docker images from Docker Hub or v1 registry to a v2 registry including Amazon EC2 Container Registry (ECR) 

https://hub.docker.com/r/docker/migrator/

## Usage

```
docker run -it \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e V1_REGISTRY=v1.registry.fqdn \
    -e V2_REGISTRY=v2.registry.fqdn \
    docker/migrator
```

### Environment Variables
The following environment variables can be set:

#### Required

  * `V1_REGISTRY` - DNS hostname of your v1 registry or Docker Hub (Do not include `https://`)
    * If migrating images from Docker Hub, use `docker.io`
  * `V2_REGISTRY` - DNS hostname of your v2 registry (Do not include `https://`)

#### Optional

  * `AWS_ACCESS_KEY` - AWS Access Key supplied as either an environment variable or as a part of your credentials file.
  * `AWS_SECRET_ACCESS_KEY` - AWS Secret Access Key supplied as either an environment variable or as a part of your credentials file.
  * `ERROR_ACTION` - Sets the default action on error for pushes and pulls
    * `prompt` - (_Default_) Prompt for user input as to what action to take on error
    * `retry` - Retry the failed action on error (may cause infinite loop of failure)
    * `skip` - Log the error and continue migration on error
    * `abort` - Abort the migration on error
  * `MIGRATION_INCREMENT` - Breaks up migration in chunks of `n` images
    * Defaults to migrating all images at once if not specified
    * Must be a positive integer
    * Only works if source and destination are not the same FQDN
  * `USER_PROMPT` - Sets the default action for user prompts (non-error)
    * `true` - (_Default_) Prompts user for input/validation
    * `false` - Skips user prompt and automatically proceeds
  * `NO_LOGIN`
    * `true` - Skips `docker login` for both the v1 and v2 registries
    * `false` - (_Default_) Prompts user to login to the v1 and v2 registries
  * `V1_NO_LOGIN`
    * `true` - Skips `docker login` for the v1 registry
{'fraction_non_alphanumeric': 0.09544863459037711, 'fraction_numerical': 0.008842652795838752, 'mean_word_length': 3.4565469293163384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '391471', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1154, 'n_words': 483}