To list all locally available Docker images, run the following command:
```console
$ docker images
```
Example Output:
```shell
REPOSITORY TAG IMAGE ID CREATED SIZE
docker-angular-sample latest 34e66bdb9d40 14 seconds ago 76.4MB
```
This output provides key details about your images:
- **Repository** – The name assigned to the image.
- **Tag** – A version label that helps identify different builds (e.g., latest).
- **Image ID** – A unique identifier for the image.
- **Created** – The timestamp indicating when the image was built.
- **Size** – The total disk space used by the image.
If the build was successful, you should see `docker-angular-sample` image listed.
---
## Run the containerized application
In the previous step, you created a Dockerfile for your Angular application and built a Docker image using the docker build command. Now it’s time to run that image in a container and verify that your application works as expected.
Inside the `docker-angular-sample` directory, run the following command in a
terminal.
```console
$ docker compose up --build
```
Open a browser and view the application at [http://localhost:8080](http://localhost:8080). You should see a simple Angular web application.
Press `ctrl+c` in the terminal to stop your application.
### Run the application in the background
You can run the application detached from the terminal by adding the `-d`
option. Inside the `docker-angular-sample` directory, run the following command
in a terminal.
```console
$ docker compose up --build -d
```
Open a browser and view the application at [http://localhost:8080](http://localhost:8080). You should see your Angular application running in the browser.
To confirm that the container is running, use `docker ps` command:
```console
$ docker ps
```
This will list all active containers along with their ports, names, and status. Look for a container exposing port 8080.
Example Output:
```shell
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
eb13026806d1 docker-angular-sample-server "nginx -c /etc/nginx…" About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp docker-angular-sample-server-1
```
To stop the application, run:
```console
$ docker compose down
```
> [!NOTE]
> For more information about Compose commands, see the [Compose CLI