mirror of
https://github.com/casjaysdevdocker/ampache
synced 2026-07-31 14:11:37 -04:00
d6e9781e15c668c45bd40a513bf82bf8ef942551
ampache / release-ampache (push) Failing after 1m53s
- rootfs/usr/local/bin/entrypoint.sh:
1. The "start all services" gate
(`if [ "$START_SERVICES" = "yes" ] || [ -z "$1" ]`) always evaluated
true on a first-run container regardless of $1, because
START_SERVICES is force-set to "yes" whenever no PID file exists yet.
Any command passed to `docker run` — `exec ...`, `sh -c ...`,
`shell`, or an arbitrary program — was swallowed into the
service-start+monitor branch before reaching the `case "$1"`
statement that already handles those subcommands, hanging the
container as a daemon instead of running the given command. Changed
the condition to `if [ -z "$1" ]` so the daemon branch only fires
when no command was given at all.
2. The `*/bin/sh | */bin/bash | bash | sh | shell)` case branch
unconditionally shifted $1 before `__exec_command "$@"` (a bare
`exec "$@"`). For `docker run image sh -c 'cmd'` this turned the
exec into `exec -c cmd` (command not found, exit 127) instead of
`exec sh -c 'cmd'`. Split the branch: real interpreter names
(*/bin/sh, */bin/bash, bash, sh) now pass through unshifted; the
"shell" keyword (not a real interpreter) gets its own branch that
shifts and prepends "sh" to any remaining args, or falls back to a
bare `__exec_command` (exec bash -l) when none remain.
Verified `bash -n` passes. Found and fixed upstream in
dockersrc/go, confirmed identical in this repo's generated
entrypoint.sh, and mechanically applied here with the same patch.
👋 Welcome to ampache 🚀
A self-contained Docker image for Ampache, the open-source web-based music streaming server. Bundles Apache 2, PHP 8.4 via PHP-FPM, MariaDB, and Ampache itself. First run opens the Ampache web installer at http://localhost:80/.
Install my system scripts
sudo bash -c "$(curl -q -LSsf "https://github.com/systemmgr/installer/raw/main/install.sh")"
sudo systemmgr --config && sudo systemmgr install scripts
Automatic install/update
dockermgr update ampache
Install and run container
dockerHome="/srv/$USER/docker/casjaysdevdocker/ampache/ampache/latest/rootfs"
mkdir -p "/srv/$USER/docker/ampache/rootfs"
git clone "https://github.com/dockermgr/ampache" "$HOME/.local/share/CasjaysDev/dockermgr/ampache"
cp -Rfva "$HOME/.local/share/CasjaysDev/dockermgr/ampache/rootfs/." "$dockerHome/"
docker run -d \
--restart always \
--privileged \
--name casjaysdevdocker-ampache-latest \
--hostname ampache \
-e TZ=${TIMEZONE:-America/New_York} \
-v "$dockerHome/data:/data:z" \
-v "$dockerHome/config:/config:z" \
-p 80:80 \
casjaysdevdocker/ampache:latest
via docker-compose
version: "2"
services:
ProjectName:
image: casjaysdevdocker/ampache
container_name: casjaysdevdocker-ampache
environment:
- TZ=America/New_York
- HOSTNAME=ampache
volumes:
- "/srv/$USER/docker/casjaysdevdocker/ampache/ampache/latest/rootfs/data:/data:z"
- "/srv/$USER/docker/casjaysdevdocker/ampache/ampache/latest/rootfs/config:/config:z"
ports:
- 80:80
restart: always
Environment variables
| Variable | Default | Description |
|---|---|---|
TZ |
America/New_York |
Container timezone (sets PHP date.timezone) |
MARIADB_ROOT_USER_NAME |
root |
MariaDB root username |
MARIADB_ROOT_PASS_WORD |
random |
MariaDB root password (auto-generated if random) |
MARIADB_USER_NAME |
ampache |
MariaDB application username |
MARIADB_USER_PASS_WORD |
random |
MariaDB application password (auto-generated if random) |
DATABASE_CREATE |
ampache |
MariaDB database name to create |
HOSTNAME |
ampache |
Container hostname used in Apache vhost |
DEBUGGER |
(unset) | Set to on to enable bash set -x debugging |
Passwords generated on first run are saved to /config/secure/auth/.
Volumes
| Path | Purpose |
|---|---|
/config |
All user-editable config files (Apache 2, PHP 8.4, MariaDB, Ampache) |
/data |
MariaDB data (/data/db/mariadb), logs (/data/logs/), and media library |
Ports
| Port | Protocol | Description |
|---|---|---|
80 |
HTTP | Ampache web UI and API |
443 |
HTTPS | Available when SSL is enabled via /config/enable/ssl |
Get source files
dockermgr download src casjaysdevdocker/ampache
OR
git clone "https://github.com/casjaysdevdocker/ampache" "$HOME/Projects/github/casjaysdevdocker/ampache"
Build container
cd "$HOME/Projects/github/casjaysdevdocker/ampache"
buildx
Authors
Description
Languages
Shell
94.3%
Dockerfile
5.7%