Skip to content

Commit e078ed4

Browse files
issue-71 instruction on how to build the container image from Dockerfile
1 parent afb69e7 commit e078ed4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,26 @@ 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:
53+
54+
```
55+
docker build --platform=linux/amd64 -t openliberty-gettingstarted:<TAG> .
56+
docker images --filter reference=openliberty-gettingstarted
57+
sudo podman run --platform=linux/amd64 -t -i -p 127.0.0.1:9080:9080 openliberty-gettingstarted:<TAG>
58+
```
59+
60+
To build the container image from Dockerfile and run locally using podman:
61+
62+
```
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>
66+
```
67+
68+
### Access the application
69+
Open a browser to http://localhost:9080
70+
5171
## Run the Sample in a container
5272

5373
To run the sample using docker run:

0 commit comments

Comments
 (0)