Skip to content

Commit

Permalink
Add support to simple-http-server
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
  • Loading branch information
patrickelectric committed Jul 15, 2023
1 parent 5d43685 commit 5d35a1c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,6 @@ RUN ./install_viu.sh && rm /install_viu.sh

COPY ./scripts/install_gping.sh /install_gping.sh
RUN ./install_gping.sh && rm /install_gping.sh

COPY ./scripts/install_simple_http_server.sh /install_simple_http_server.sh
RUN ./install_simple_http_server.sh && rm /install_simple_http_server.sh
15 changes: 15 additions & 0 deletions scripts/install_simple_http_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

# exit when any command fails
set -e

VERSION="v0.6.7"

# By default we install armv7
REMOTE_BINARY_URL="https://github.com/TheWaWaR/simple-http-server/releases/download/${VERSION}/armv7-unknown-linux-musleabihf-simple-http-server"
if [[ "$(uname -m)" == "x86_64"* ]]; then
REMOTE_BINARY_URL="https://github.com/TheWaWaR/simple-http-server/releases/download/${VERSION}/x86_64-unknown-linux-musl-simple-http-server"
fi

wget $REMOTE_BINARY_URL -O /usr/bin/simple-http-server
chmod +x /usr/bin/simple-http-server

0 comments on commit 5d35a1c

Please sign in to comment.