Born and raised in London. Just a normal guy with a moral compass.

  • 15 Posts
  • 33 Comments
Joined 8 months ago
cake
Cake day: March 16th, 2024

help-circle









  • sabreW4K3@lazysoci.alOPtoDockerIs this a stupid question?
    link
    fedilink
    English
    arrow-up
    2
    ·
    5 months ago

    I took the dockerfile from https://github.com/linuxserver/docker-headphones/blob/master/Dockerfile

    Updated it to look like

    # syntax=docker/dockerfile:1
    
    FROM ghcr.io/linuxserver/baseimage-alpine:3.20
    
    # set version label
    ARG BUILD_DATE
    ARG VERSION
    ARG HEADPHONES_COMMIT
    LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
    LABEL maintainer="aptalca"
    # hard set UTC in case the user does not define it
    ENV TZ="Etc/UTC"
    
    # copy patches folder
    COPY patches/ /tmp/patches/
    
    RUN \
      echo "**** install build packages ****" && \
      apk add --no-cache --virtual=build-dependencies \
        build-base && \
      echo "**** install runtime packages ****" && \
      apk add --no-cache \
        ffmpeg \
        flac \
        mc \
        python3 && \
      echo "**** compile shntool *** *" && \
      mkdir -p \
        /tmp/shntool && \
      tar xf /tmp/patches/shntool-3.0.10.tar.gz -C \
        /tmp/shntool --strip-components=1 && \
      cp /tmp/patches/config.* /tmp/shntool && \
      cd /tmp/shntool && \
      ./configure \
        --infodir=/usr/share/info \
        --localstatedir=/var \
        --mandir=/usr/share/man \
        --prefix=/usr \
        --sysconfdir=/etc && \
      make && \
      make install && \
      echo "**** install headphones ****" && \
      mkdir -p /app/headphones && \
      if [ -z ${HEADPHONES_COMMIT+x} ] ; then \
        HEADPHONES_COMMIT=$(curl -sX GET "https://api.github.com/repos/rembo10/headphones/commits/master" \
        | jq -r .sha); \
      fi && \
      curl -o \
        /tmp/headphones.tar.gz -sL \
        "https://github.com/rembo10/headphones/archive/${HEADPHONES_COMMIT}.tar.gz" && \
      tar xf \
        /tmp/headphones.tar.gz -C \
        /app/headphones --strip-components=1 && \
      echo ${HEADPHONES_COMMIT} > /app/headphones/version.txt && \
      echo "**** cleanup ****" && \
      apk del --purge \
        build-dependencies && \
      rm -rf \
        /tmp/* \
        /usr/lib/*.la
    
    # add local files
    COPY root/ /
    
    # ports and volumes
    EXPOSE 8181
    VOLUME /config
    

    Saved it and ran docker build -t headphones /headphones/

    And expected it to work 🫣




  • sabreW4K3@lazysoci.alOPtoDockerPlease teach me about images
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    Thank you so much. Okay. I’m trying to update an image that’s been depreciated. I figure all I have to do is update the Docker file and the rest should be simple.

    I want to do it on my Pi, but I don’t want to pollute my Pi with superfluous stuff. Is that a pipe dream? Everything seems to say yes, but I just need confirmation.

    If yes, I guess I need to create a new directory. If I create a new directory and then create the Docker file there, will it affect my image? Like do I need to match the directory name and image name?

    Sorry, these are super basic questions, but I always get super anxious before trying things. What I love about Docker is that I can always delete and start again and the fact that this doesn’t follow that is making me extra cautious.

















  • I don’t know if it was because it’s 420, but your reply was like the clouds opening and an angel stepping out. Thank you so so so so much. I spent the hour after you posted this looking at Ubiquiti switches and access points and decided on the 8 Lite and 6+, but then I watched the reviews and realised that they’re cloud managed and that kinda bothers me, I want to be able to control my devices no matter what and the auto updating of firmware is also concerning. But the thing is, all the locally managed switches I’ve seen pale in comparison in regards to UI when compared to UniFi, so I think I’m going to have to spend a bit of time learning about the pros and cons of cloud managed versus locally managed and if there’s anything that compares.