-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Start from Alpine base image | ||
FROM alpine | ||
LABEL maintainer="Mr.Philipp <[email protected]>" | ||
LABEL version="0.2" | ||
LABEL version="0.3" | ||
|
||
# Set the working directory to /opt/app | ||
WORKDIR /opt/app | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# Exit immediately if a command exits with a non-zero status | ||
# VERSION 0.3 by [email protected] aka Mr. Philipp | ||
set -e | ||
|
||
# Benchmarking the start time get | ||
start_time=$(date +%s) | ||
|
||
printf "\033[1;34mBuilding OpenVPN Server Image.\033[0m\n" | ||
docker build --force-rm=true -t d3vilh/openvpn-server . | ||
|
||
# Benchmarking the end time record | ||
end_time=$(date +%s) | ||
|
||
# Calculate the execution time in seconds | ||
execution_time=$((end_time - start_time)) | ||
|
||
# Calculate the execution time in minutes and seconds | ||
minutes=$((execution_time / 60)) | ||
seconds=$((execution_time % 60)) | ||
|
||
# Print the execution time in mm:ss format | ||
printf "\033[1;34mExecution time: %02d:%02d\033[0m (%d sec)\n" $minutes $seconds $execution_time |