command, you should see output similar to the following.
```console {collapse=true}
[+] Building 0.6s (6/6) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 128B 0.0s
=> [internal] load metadata for docker.io/library/nginx:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/2] FROM docker.io/library/nginx:latest 0.1s
=> [2/2] RUN echo "<h1>Hello world from Docker!</h1>" > /usr/share/ 0.2s
=> exporting to image 0.1s
=> => exporting layers 0.0s
=> => writing image sha256:f85ab68f4987847713e87a95c39009a5c9f4ad78 0.0s
=> => naming to docker.io/mobyismyname/nginx-custom 0.0s
```
3. Run the following command to test your image. Replace `<YOUR-USERNAME>` with
your Docker ID.
```console
$ docker run -p 8080:80 --rm <YOUR-USERNAME>/nginx-custom
```
4. Visit [https://localhost:8080](https://localhost:8080) to view the page. You
should see `Hello world from Docker!`.
5. In the terminal, press CTRL+C to stop the container.
6. Sign in to Docker Desktop. You must be signed in before pushing an image to
Docker Hub.
7. Run the following command to push your image to Docker Hub. Replace `<YOUR-USERNAME>` with your Docker ID.
```console
$ docker push <YOUR-USERNAME>/nginx-custom
```
> [!NOTE]
>
> You must be signed in to Docker Hub through Docker Desktop or the command line, and you must also name your images correctly, as per the above steps.
The command pushes the image to Docker Hub and automatically
creates the repository if it doesn't exist. To learn more about the command,
see the [`docker push` CLI
reference](../../reference/cli/docker/image/push.md). After running the