packaging: Install on Alpine distro

This commit is contained in:
Andrew Hamilton 2024-03-08 23:25:15 +10:00
parent 29c359d39d
commit 6d2e34e049
4 changed files with 26 additions and 2 deletions

View file

@ -6,7 +6,7 @@ Eris maintains an up-to-date set of reports for every file in a codebase.
## Installation
#### Debian / Ubuntu / Fedora / Arch
#### Debian / Ubuntu / Fedora / Arch / Alpine
Install eris with pipx, then install all the tools eris uses:

View file

@ -1146,6 +1146,17 @@ def install_all_tools():
tools_ = ["python-" + tool[len("python3-"):] if tool.startswith("python3-") else tool
for tool in tools_]
install_command = ["pacman", "--noconfirm", "-S"]
elif "ID=alpine\n" in os_release_lines:
tools_.remove("python3-bandit")
tools_.remove("wabt")
tools_.remove("unrar")
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "ruby3.1": "ruby", "xz-utils": "xz",
"g++": "gcc", "golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
"pylint": "py3-pylint", "tidy": "tidyhtml"}
tools_ = [renames.get(tool, tool) for tool in tools_]
tools_ = ["py3-" + tool[len("python3-"):] if tool.startswith("python3-") else tool
for tool in tools_]
install_command = ["apk", "add"]
subprocess.run(["sudo"] + install_command + sorted(tools_), check=True)

View file

@ -0,0 +1,13 @@
FROM alpine:3.19.1
RUN apk add pipx gcc sudo python3-dev musl-dev
COPY . eris
RUN PIPX_BIN_DIR=/bin pipx install --system-site-packages ./eris/eris
RUN eris --install-all-tools
ENTRYPOINT ["eris"]
# docker build -t eris -f packaging/Dockerfile.arch .

View file

@ -22,7 +22,7 @@ Eris maintains an up-to-date set of reports for every file in a codebase.
## Installation
#### Debian / Ubuntu / Fedora / Arch
#### Debian / Ubuntu / Fedora / Arch / Alpine
Install eris with pipx, then install all the tools eris uses: