Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add traefik with required libraries and build from source #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app-traefik-source/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the extra empty line

traefik*
11 changes: 11 additions & 0 deletions app-traefik-source/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Build Script

This build script downloads the latest version of traefik form the
corresponding github releases page. To modify the installation version change
the `version` variable in the `build.sh`.
Comment on lines +3 to +5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This build script downloads the latest version of traefik form the
corresponding github releases page. To modify the installation version change
the `version` variable in the `build.sh`.
This build script downloads the latest version of traefik form the corresponding github releases page.
To modify the installation version change the `version` variable in the `build.sh`.

Use one line per sentence and one sentence per line.


# Requirements

*Not installed by the build script.*

* golang: 1.20.6
Comment on lines +9 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the installation instructions here (don't go into details, you can just point to a link where people can find instructions).

49 changes: 49 additions & 0 deletions app-traefik-source/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

version=v2.10.3
name=traefik
appname=${name}-${version}
tarball=${appname}.src.tar.gz

extract=../extract.sh

echo "Cleaning artefacts ..."
rm -rf ${tarball} ${appname} ${name}

echo -n "Downloading ${tarball} ... "
wget -q https://github.com/traefik/traefik/releases/download/${version}/${tarball}
echo ""

echo -n "Unpacking traefik ... "
mkdir -p ./$appname
tar xzf $tarball -C ./$appname
echo ""

echo -n "Setting up GO env ... "
export GOPATH=~/go
export PATH=$PATH:$GOPATH/bin
echo ""

echo -n "Building traefik ... "
make clean-webui -C ${appname}
echo ""

pushd ${appname}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pushd ${appname}
pushd ${appname} &> /dev/null || exit 1


echo "${appname}: Running GO get ..."
go get &&
go mod tidy &&
go generate &&
go build -ldflags "-linkmode 'external' -extldflags '-pie'" -buildmode=pie \
./cmd/traefik

popd +0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
popd +0
popd +0 &> /dev/null || exit 1


if test -f ${appname}/${name}; then
ln -s ${appname}/${name} ./${name}
fi

echo "Extracting dependencies ..."
$extract ./${name}

echo "Done"
Binary file added app-traefik-source/lib64/ld-linux-x86-64.so.2
Binary file not shown.
Binary file added app-traefik-source/usr/lib/libc.so.6
Binary file not shown.
Binary file added app-traefik-source/usr/lib/libresolv.so.2
Binary file not shown.
Binary file not shown.