diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8873b0a0..3cdf2b8a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -59,7 +59,7 @@ RUN if { [ "$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')" = "ubuntu # Download and extract latest GStreamer component RUN cd /opt && SELKIES_VERSION=$(curl -fsSL "https://api.github.com/repos/selkies-project/selkies-gstreamer/releases/latest" | jq -r '.tag_name' | sed 's/[^0-9\.\-]*//g') && \ - curl -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/v${SELKIES_VERSION}/selkies-gstreamer-v${SELKIES_VERSION}-ubuntu$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"').tar.gz" | sudo tar -xzf - + curl -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/v${SELKIES_VERSION}/selkies-gstreamer-v${SELKIES_VERSION}-$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"').tar.gz" | sudo tar -xzf - # Install development dependencies ARG PIP_BREAK_SYSTEM_PACKAGES=1 diff --git a/.devcontainer/features/desktop-selkies/src/install.sh b/.devcontainer/features/desktop-selkies/src/install.sh index e500fe33..269865d0 100755 --- a/.devcontainer/features/desktop-selkies/src/install.sh +++ b/.devcontainer/features/desktop-selkies/src/install.sh @@ -82,7 +82,7 @@ fi SELKIES_VERSION=${SELKIES_RELEASE_TAG:1} cd /opt -curl -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/${SELKIES_RELEASE_TAG}/selkies-gstreamer-${SELKIES_RELEASE_TAG}-ubuntu$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"').tar.gz" | tar -xzf - +curl -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/${SELKIES_RELEASE_TAG}/selkies-gstreamer-${SELKIES_RELEASE_TAG}-$(grep '^ID=' /etc/os-release | cut -d= -f2 | tr -d '\"')$(grep '^VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '\"').tar.gz" | tar -xzf - curl -O -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/${SELKIES_RELEASE_TAG}/selkies_gstreamer-${SELKIES_VERSION}-py3-none-any.whl" && PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install --no-cache-dir "selkies_gstreamer-${SELKIES_VERSION}-py3-none-any.whl" && rm -f "selkies_gstreamer-${SELKIES_VERSION}-py3-none-any.whl" curl -fsSL "https://github.com/selkies-project/selkies-gstreamer/releases/download/${SELKIES_RELEASE_TAG}/selkies-gstreamer-web-${SELKIES_RELEASE_TAG}.tar.gz" | tar -xzf - diff --git a/addons/example/Dockerfile b/addons/example/Dockerfile index 7c5486fe..3a27f2cd 100644 --- a/addons/example/Dockerfile +++ b/addons/example/Dockerfile @@ -11,10 +11,10 @@ ARG PY_BUILD_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/py-build:main ARG WEB_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/gst-web:main ARG JS_BASE_IMAGE=ghcr.io/selkies-project/selkies-gstreamer/js-interposer ARG JS_BASE_IMAGE_RELEASE=main -FROM ${GSTREAMER_BASE_IMAGE}:${GSTREAMER_BASE_IMAGE_RELEASE}-ubuntu${DISTRIB_RELEASE} AS selkies-gstreamer +FROM ${GSTREAMER_BASE_IMAGE}:${GSTREAMER_BASE_IMAGE_RELEASE}-${DISTRIB_IMAGE}${DISTRIB_RELEASE} AS selkies-gstreamer FROM ${PY_BUILD_IMAGE} AS selkies-build FROM ${WEB_IMAGE} AS selkies-web -FROM ${JS_BASE_IMAGE}:${JS_BASE_IMAGE_RELEASE}-ubuntu${DISTRIB_RELEASE} AS selkies-js-interposer +FROM ${JS_BASE_IMAGE}:${JS_BASE_IMAGE_RELEASE}-${DISTRIB_IMAGE}${DISTRIB_RELEASE} AS selkies-js-interposer FROM ${DISTRIB_IMAGE}:${DISTRIB_RELEASE} ARG DISTRIB_IMAGE ARG DISTRIB_RELEASE diff --git a/docker-compose.yml b/docker-compose.yml index 7f3c69ef..a1ed28ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,19 +19,20 @@ services: dockerfile: Dockerfile test: ### - # NOTE: export the DISTRIB_RELEASE env var to change the base image during build and run. + # NOTE: export the DISTRIB_IMAGE and DISTRIB_RELEASE environment variables to change the base image during build and run. ### - image: selkies-gstreamer-example:latest-ubuntu${DISTRIB_RELEASE:-24.04} + image: selkies-gstreamer-example:latest-${DISTRIB_IMAGE:-ubuntu}${DISTRIB_RELEASE:-24.04} entrypoint: ["/tini", "--", "/bin/bash"] build: context: ./addons/example dockerfile: Dockerfile args: + DISTRIB_IMAGE: ${DISTRIB_IMAGE:-ubuntu} DISTRIB_RELEASE: ${DISTRIB_RELEASE:-24.04} # Testing with gstreamer build in-repo: - # 1. (cd addons/gstreamer && docker build --build-arg DISTRIB_RELEASE=${DISTRIB_RELEASE?} -t gstreamer:latest-ubuntu${DISTRIB_RELEASE?} .) + # 1. (cd addons/gstreamer && docker build --build-arg DISTRIB_IMAGE=${DISTRIB_IMAGE?} --build-arg DISTRIB_RELEASE=${DISTRIB_RELEASE?} -t gstreamer:latest-${DISTRIB_IMAGE?}${DISTRIB_RELEASE?} .) # 2. export GSTREAMER_BASE_IMAGE=gstreamer # 3. docker-compose build test GSTREAMER_BASE_IMAGE: ${GSTREAMER_BASE_IMAGE:-ghcr.io/selkies-project/selkies-gstreamer/gstreamer}