mirror of
https://github.com/navidrome/navidrome.git
synced 2025-12-23 15:08:04 -05:00
* Signed-off-by: floatlesss <117862164+floatlesss@users.noreply.github.com> fix(vscodedevcontainer): fix-taglib-build-issues - #4749 * Apply Gemini suggested changes Signed-off-by: floatlesss <117862164+floatlesss@users.noreply.github.com> * chore: install TagLib in devcontainer Dockerfile Move TagLib installation from postCreateCommand script into the devcontainer Dockerfile to leverage Docker layer caching and simplify setup.\n\nChanges:\n- Install cross-taglib v2.1.1-1 directly in Dockerfile using TARGETARCH for multi-arch support (amd64/arm64).\n- Remove redundant libtag1-dev apt dependency; keep ffmpeg only.\n- Add CROSS_TAGLIB_VERSION as a build arg for consistency with CI/Makefile.\n- Remove postCreateCommand from devcontainer.json and delete install-taglib.sh script.\n\nWhy:\n- Avoid re-downloading TagLib on each container create; benefit from cached image layers.\n- Reduce redundancy and potential version mismatch between apt libtag and cross-taglib.\n- Keep devcontainer aligned with production build approach and CI settings. --------- Signed-off-by: floatlesss <117862164+floatlesss@users.noreply.github.com> Co-authored-by: Deluan <deluan@navidrome.org>
28 lines
1.3 KiB
Docker
28 lines
1.3 KiB
Docker
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/go/.devcontainer/base.Dockerfile
|
|
|
|
# [Choice] Go version: 1, 1.15, 1.14
|
|
ARG VARIANT="1"
|
|
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}
|
|
|
|
# [Option] Install Node.js
|
|
ARG INSTALL_NODE="true"
|
|
ARG NODE_VERSION="lts/*"
|
|
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
|
|
|
|
# Install additional OS packages
|
|
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|
&& apt-get -y install --no-install-recommends ffmpeg
|
|
|
|
# Install TagLib from cross-taglib releases
|
|
ARG CROSS_TAGLIB_VERSION="2.1.1-1"
|
|
ARG TARGETARCH
|
|
RUN DOWNLOAD_ARCH="linux-${TARGETARCH}" \
|
|
&& wget -q "https://github.com/navidrome/cross-taglib/releases/download/v${CROSS_TAGLIB_VERSION}/taglib-${DOWNLOAD_ARCH}.tar.gz" -O /tmp/cross-taglib.tar.gz \
|
|
&& tar -xzf /tmp/cross-taglib.tar.gz -C /usr --strip-components=1 \
|
|
&& mv /usr/include/taglib/* /usr/include/ \
|
|
&& rmdir /usr/include/taglib \
|
|
&& rm /tmp/cross-taglib.tar.gz /usr/provenance.json
|
|
|
|
# [Optional] Uncomment this line to install global node packages.
|
|
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|