Skip to content

Commit 33bdfe3

Browse files
authored
Update README.md
1 parent a0a4d64 commit 33bdfe3

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Wake on LAN on Steroids for your HomeLab
23
![enter image description here](https://media.licdn.com/dms/image/v2/D4E12AQF6AW53XmHJKQ/article-inline_image-shrink_1500_2232/article-inline_image-shrink_1500_2232/0/1726568056394?e=1732147200&v=beta&t=ewBC8EpUBnNUM3v8IaNtCi9PfXQsgsXlUNNOoI1CrhI)
34

@@ -222,11 +223,31 @@ In order to **_add our newly created certificate to our Spring Boot application_
222223

223224
### Dockerizing our Spring Boot Application
224225

225-
I was wanting to add a full step-by-step solution on this topic, but let's be honest, there are thousands of tutorials on how to **_dockerize a Spring Boot application_**.
226+
In order to **containerize and deploy** this tool, with *docker engine installed* you can **create this two files**:
227+
228+
**File**: dockerfile
229+
230+
FROM openjdk:17-jdk-slim
231+
ARG JAR_FILE=target/*.jar
232+
COPY ${JAR_FILE} wol.jar
233+
ENTRYPOINT ["java","-jar","/wol.jar"]
234+
235+
**File**: deploy.sh
236+
237+
docker build -t "wol_api" .
238+
docker run -d --name "WoL_API" -p 7800:7800/tcp "wol_api"
226239

227-
Since our app is built in a **self-contained jar file**, we just need to _download our favourite flavour of linux image, expose one port_, and have our app do a **_java -jar wol.jar_** on our container startup.
240+
Add **permission** to deploy.sh to run it:
241+
242+
sudo chmod 755 deploy.sh
243+
244+
Then just **run** the deploy script:
245+
246+
. deploy.sh
247+
248+
![imagen](https://github.com/user-attachments/assets/9b983397-fbfa-4aef-9d5d-f7f190d79da9)
228249

229-
[This guide covers **pretty much everything I noted just now.**](https://www.baeldung.com/dockerizing-spring-boot-application)
250+
You should now have a *running container* called **WoL_API**.
230251

231252
## Remote Shutdown API Service
232253
From version *0.0.8* onwards, this API is compatible with this project **[Remote Shutdown API Service](https://github.com/elModo7/Remote-Shutdown-API)**.

0 commit comments

Comments
 (0)