Skip to content

Commit 40a8cf2

Browse files
issue-71 update container build instructions
1 parent 0040697 commit 40a8cf2

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,22 @@ if you just want to build it run:
4848
mvnw package
4949
```
5050

51-
## Build container image from Dockerfile and run locally
52-
To build the container image from Dockerfile and run locally using docker:
51+
## Build and Run Docker Container Locally
52+
### Build the project
5353

5454
```
55-
docker build --platform=linux/amd64 -t openliberty-gettingstarted:<TAG> .
56-
docker images --filter reference=openliberty-gettingstarted
57-
sudo docker run --platform=linux/amd64 -t -i -p 127.0.0.1:9080:9080 openliberty-gettingstarted:<TAG>
55+
./mvnw package
5856
```
5957

60-
To build the container image from Dockerfile and run locally using podman:
58+
### Build the Docker image
6159

6260
```
63-
podman build --platform=linux/amd64 -t openliberty-gettingstarted:<TAG> .
64-
podman images --filter reference=openliberty-gettingstarted
65-
sudo podman run --platform=linux/amd64 -t -i -p 127.0.0.1:9080:9080 openliberty-gettingstarted:<TAG>
61+
docker build -t openliberty-gettingstarted .
62+
```
63+
### Run the Docker container
64+
65+
```
66+
docker run -p 9080:9080 openliberty-gettingstarted
6667
```
6768

6869
### Access the application

0 commit comments

Comments
 (0)