From 40a8cf27d5ffec4ee23e1c2d8eb3f874f073d4f8 Mon Sep 17 00:00:00 2001 From: Thasnim Abdulla Date: Sun, 25 May 2025 22:05:23 +0530 Subject: [PATCH] issue-71 update container build instructions --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9d755eb6..bdbab151 100644 --- a/README.md +++ b/README.md @@ -48,21 +48,22 @@ 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: +## Build and Run Docker Container Locally +### Build the project ``` -docker build --platform=linux/amd64 -t openliberty-gettingstarted: . -docker images --filter reference=openliberty-gettingstarted -sudo docker run --platform=linux/amd64 -t -i -p 127.0.0.1:9080:9080 openliberty-gettingstarted: +./mvnw package ``` -To build the container image from Dockerfile and run locally using podman: +### Build the Docker image ``` -podman build --platform=linux/amd64 -t openliberty-gettingstarted: . -podman images --filter reference=openliberty-gettingstarted -sudo podman run --platform=linux/amd64 -t -i -p 127.0.0.1:9080:9080 openliberty-gettingstarted: +docker build -t openliberty-gettingstarted . +``` +### Run the Docker container + +``` +docker run -p 9080:9080 openliberty-gettingstarted ``` ### Access the application