# Docker How to Change Repository Name or Rename Image?

## Docker image

Docker image name and tag are just an alias to a docker image id that looks similar to this `d583c3ac45fd`. If you want to change the name, run the following command:

```bash
docker image tag old_name:tag new_name:tag
```

You can have as many tags to one image, as you want.

if you want to delete one of the names, use the following command:

```bash
docker rmi new_name
```

Since the `d583c3ac45fd` has many names, it will just remove the alias.

## Docker container

Renaming the docker container is also very simple. To rename the docker container, run the following command:

```bash
ocker rename old_container_name new_container_name
```
