Skip to content

Commit

Permalink
issue-71 instruction on how to build the container image from Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
thasnim-fluxone committed Nov 28, 2024
1 parent afb69e7 commit e078ed4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ if you just want to build it run:
mvnw package
```

## Build container image from Dockerfile and run locally
To build the container image from Dockerfile and run locally using docker:

```
docker build --platform=linux/amd64 -t openliberty-gettingstarted:<TAG> .
docker images --filter reference=openliberty-gettingstarted
sudo podman run --platform=linux/amd64 -t -i -p 127.0.0.1:9080:9080 openliberty-gettingstarted:<TAG>
```

To build the container image from Dockerfile and run locally using podman:

```
podman build --platform=linux/amd64 -t openliberty-gettingstarted:<TAG> .
podman images --filter reference=openliberty-gettingstarted
sudo podman run --platform=linux/amd64 -t -i -p 127.0.0.1:9080:9080 openliberty-gettingstarted:<TAG>
```

### Access the application
Open a browser to http://localhost:9080

## Run the Sample in a container

To run the sample using docker run:
Expand Down

0 comments on commit e078ed4

Please sign in to comment.