Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Mar 7, 2024
1 parent aa2bd6f commit 3e23911
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 55 deletions.
30 changes: 28 additions & 2 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,35 @@ grafana_version=10.3.3
webssh_version=1.6.2

echo "Build webssh container" # from https://github.com/huashengdun/webssh
pushd webssh
./build-images.sh "${webssh_version}"
# Create a new empty container for webssh
echo "Build webssh container" # from https://github.com/huashengdun/webssh
mkdir -p webssh_tmp/build
pushd webssh_tmp
wget https://github.com/huashengdun/webssh/archive/refs/tags/v${webssh_version}.tar.gz -O webssh.tar.gz
tar xvzf webssh.tar.gz -C build --strip-components=1
pushd build
webssh=$(buildah from docker.io/python:3-alpine)
buildah add "${webssh}" . /code
buildah run \
--workingdir '/code' \
${webssh} \
sh -c "apk add --no-cache libc-dev libffi-dev gcc && \
pip install -r requirements.txt --no-cache-dir && \
apk del gcc libc-dev libffi-dev && \
addgroup webssh && \
adduser -Ss /bin/false -g webssh webssh && \
chown -R webssh:webssh /code
"
popd
popd
rm -rf webssh_tmp
# Commit the image
buildah add "${webssh}" webssh/entrypoint.sh /entrypoint.sh
buildah config --workingdir '/code' --entrypoint='["/entrypoint.sh"]' --cmd='["python", "run.py"]' "${webssh}"
buildah commit "${webssh}" "${repobase}/webssh"

# Append the image URL to the images array
images+=("${repobase}/webssh")

# Create a new empty container image
container=$(buildah from scratch)
Expand Down
53 changes: 0 additions & 53 deletions webssh/build-images.sh

This file was deleted.

0 comments on commit 3e23911

Please sign in to comment.