Skip to content

Commit

Permalink
Build script and Dockerfile update
Browse files Browse the repository at this point in the history
  • Loading branch information
d3vilh committed Sep 21, 2023
1 parent 4781d16 commit dbfd339
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Fast Docker container with OpenVPN Server living inside.

[![latest version](https://img.shields.io/github/v/release/d3vilh/openvpn-ui?color=%2344cc11&label=OpenVPN%20UI&style=flat-square&logo=Github)](https://github.com/d3vilh/openvpn-ui) [![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/d3vilh/openvpn-ui/latest?logo=docker&label=OpenVPN%20UI%20IMAGE&color=2344cc11&style=flat-square&logoColor=white)](https://hub.docker.com/r/d3vilh/openvpn-ui)

## Important change in `v.0.3` release
Default OpenVPN server configuration directory changed from `./openvpn` to `./openvpn-server`. You can easy move all your configuration with `sudo mv openvpn openvpn-server` command.

## Run this image

Expand Down
23 changes: 23 additions & 0 deletions build-image.sh
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

0 comments on commit dbfd339

Please sign in to comment.