mirror of
https://gitlab.com/Bockiii/deemix-docker.git
synced 2024-08-30 17:32:18 +00:00
Rebase, port fix and changelog
This commit is contained in:
parent
9c0ad0e7f0
commit
a92efee3a8
@ -7,26 +7,31 @@ stages:
|
|||||||
|
|
||||||
variables:
|
variables:
|
||||||
IMAGE: registry.gitlab.com/bockiii/deemix-docker
|
IMAGE: registry.gitlab.com/bockiii/deemix-docker
|
||||||
|
IMAGE_TAG: latest
|
||||||
DOCKER_CLI_EXPERIMENTAL: enabled
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
- apk add --update curl && rm -rf /var/cache/apk/*
|
- apk add --update curl && rm -rf /var/cache/apk/*
|
||||||
|
- export CI_JOB_TIMESTAMP=$(date --utc -Iseconds)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
- docker build --pull -f Dockerfile.arm64v8 -t $IMAGE:arm64v8 .
|
- docker build --pull -f Dockerfile.arm64v8 --build-arg BUILDDATE=$CI_JOB_TIMESTAMP -t $IMAGE:arm64v8-${IMAGE_TAG} .
|
||||||
- docker push $IMAGE:arm64v8
|
- docker build --pull -f Dockerfile.arm32v7 --build-arg BUILDDATE=$CI_JOB_TIMESTAMP -t $IMAGE:arm32v7-${IMAGE_TAG} .
|
||||||
- docker build --pull -f Dockerfile.arm32v7 -t $IMAGE:arm32v7 .
|
- docker build --pull --build-arg BUILDDATE=$CI_JOB_TIMESTAMP -t $IMAGE:amd64-${IMAGE_TAG} .
|
||||||
- docker push $IMAGE:arm32v7
|
- docker push $IMAGE:arm64v8-${IMAGE_TAG}
|
||||||
- docker build --pull -t $IMAGE:amd64 .
|
- docker push $IMAGE:arm32v7-${IMAGE_TAG}
|
||||||
- docker push $IMAGE:amd64
|
- docker push $IMAGE:amd64-${IMAGE_TAG}
|
||||||
- set -e
|
- docker manifest create "$IMAGE:${IMAGE_TAG}"
|
||||||
- HOST_ARCH=$(uname -m)
|
"$IMAGE:amd64-${IMAGE_TAG}"
|
||||||
- HOST_ARCH_ALIAS=$([[ "${HOST_ARCH}" == "x86_64" ]] && echo "amd64" || echo "${HOST_ARCH}")
|
"$IMAGE:arm32v7-${IMAGE_TAG}"
|
||||||
- MANIFEST_TOOL_VERSION=$(curl -s https://api.github.com/repos/estesp/manifest-tool/releases/latest | grep 'tag_name' | cut -d\" -f4)
|
"$IMAGE:arm64v8-${IMAGE_TAG}"
|
||||||
- curl -L https://github.com/estesp/manifest-tool/releases/download/$MANIFEST_TOOL_VERSION/manifest-tool-linux-$HOST_ARCH_ALIAS -o manifest-tool
|
- docker manifest annotate "$IMAGE:${IMAGE_TAG}" "$IMAGE:arm32v7-${IMAGE_TAG}" --os=linux --arch=arm --variant=v7
|
||||||
- chmod +x manifest-tool
|
- docker manifest annotate "$IMAGE:${IMAGE_TAG}" "$IMAGE:arm64v8-${IMAGE_TAG}" --os=linux --arch=arm64 --variant=v8
|
||||||
- ./manifest-tool push from-spec manifest.yaml
|
# Push manifest to official registry
|
||||||
|
- docker manifest push "$IMAGE:${IMAGE_TAG}"
|
||||||
|
# Validate multi-arch manifest
|
||||||
|
- docker run --rm mplatform/mquery:v0.2 $IMAGE:${IMAGE_TAG}
|
6
CHANGELOG.md
Normal file
6
CHANGELOG.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 2020-06-11
|
||||||
|
- First entry in the changelog. This is for the container only, not for deemix or any of it's components.
|
||||||
|
- Switched port to 6595 from 9666 (due to pyweb update). THIS SHOULD BE FIX NOW. I have hard-coded the port into the run parameter, so even if deemix itself will switch the port, you should always just have to map to 6595
|
||||||
|
- Switched the base from a pre-build alpine-python3 build (that was pretty old) to the current alpine base with my own python installation.
|
34
Dockerfile
34
Dockerfile
@ -1,27 +1,39 @@
|
|||||||
FROM lsiobase/alpine.python3:3.9
|
FROM lsiobase/alpine:3.12
|
||||||
|
|
||||||
ENV PUID=1000
|
ARG BUILDDATE
|
||||||
ENV PGID=1000
|
|
||||||
|
|
||||||
EXPOSE 9666
|
LABEL \
|
||||||
|
app.deemix.image.created="${BUILDDATE}" \
|
||||||
|
app.deemix.image.url="https://gitlab.com/Bockiii/deemix-docker" \
|
||||||
|
app.deemix.image.title="Docker image for Deemix" \
|
||||||
|
app.deemix.image.description="Docker image for Deemix and the pyweb frontend" \
|
||||||
|
maintainer="Bocki"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apk update && \
|
echo "**** install build packages ****" && \
|
||||||
apk add --no-cache \
|
apk add --no-cache --virtual=build-dependencies \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
make
|
git \
|
||||||
|
make && \
|
||||||
|
echo "**** install packages ****" && \
|
||||||
RUN \
|
apk add --no-cache \
|
||||||
|
py3-pip \
|
||||||
|
python3 && \
|
||||||
|
echo "**** setup directories ****" && \
|
||||||
mkdir /deem && \
|
mkdir /deem && \
|
||||||
chown abc:abc /deem && \
|
chown abc:abc /deem && \
|
||||||
rm -R /config && \
|
rm -R /config && \
|
||||||
ln -sf /deem/.config/deemix /config && \
|
ln -sf /deem/.config/deemix /config && \
|
||||||
ln -sf /downloads /deem/deemix\ Music
|
ln -sf /downloads /deem/deemix\ Music && \
|
||||||
|
echo "**** clean up ****" && \
|
||||||
|
rm -rf \
|
||||||
|
/root/.cache \
|
||||||
|
/tmp/*
|
||||||
|
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|
||||||
|
EXPOSE 6595
|
||||||
VOLUME /downloads /config
|
VOLUME /downloads /config
|
@ -1,36 +1,49 @@
|
|||||||
FROM alpine AS builder
|
FROM alpine AS builder
|
||||||
|
|
||||||
# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261
|
# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261
|
||||||
#ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz
|
|
||||||
ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v4.0.0-balena/qemu-4.0.0-balena-arm.tar.gz
|
ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v4.0.0-balena/qemu-4.0.0-balena-arm.tar.gz
|
||||||
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1
|
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1
|
||||||
|
|
||||||
FROM lsiobase/alpine.python3.armhf:3.9
|
|
||||||
|
FROM lsiobase/alpine:arm32v7-3.12
|
||||||
|
|
||||||
# Add QEMU
|
# Add QEMU
|
||||||
COPY --from=builder qemu-arm-static /usr/bin
|
COPY --from=builder qemu-arm-static /usr/bin
|
||||||
|
|
||||||
ENV PUID=1000
|
ARG BUILDDATE
|
||||||
ENV PGID=1000
|
|
||||||
|
|
||||||
EXPOSE 9666
|
LABEL \
|
||||||
|
app.deemix.image.created="${BUILDDATE}" \
|
||||||
|
app.deemix.image.url="https://gitlab.com/Bockiii/deemix-docker" \
|
||||||
|
app.deemix.image.title="Docker image for Deemix" \
|
||||||
|
app.deemix.image.description="Docker image for Deemix and the pyweb frontend" \
|
||||||
|
maintainer="Bocki"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apk update && \
|
echo "**** install build packages ****" && \
|
||||||
apk add --no-cache \
|
apk add --no-cache --virtual=build-dependencies \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
make
|
git \
|
||||||
|
make && \
|
||||||
RUN \
|
echo "**** install packages ****" && \
|
||||||
|
apk add --no-cache \
|
||||||
|
py3-pip \
|
||||||
|
python3 && \
|
||||||
|
echo "**** setup directories ****" && \
|
||||||
mkdir /deem && \
|
mkdir /deem && \
|
||||||
chown abc:abc /deem && \
|
chown abc:abc /deem && \
|
||||||
rm -R /config && \
|
rm -R /config && \
|
||||||
ln -sf /deem/.config/deemix /config && \
|
ln -sf /deem/.config/deemix /config && \
|
||||||
ln -sf /downloads /deem/deemix\ Music
|
ln -sf /downloads /deem/deemix\ Music && \
|
||||||
|
echo "**** clean up ****" && \
|
||||||
|
rm -rf \
|
||||||
|
/root/.cache \
|
||||||
|
/tmp/*
|
||||||
|
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|
||||||
|
EXPOSE 6595
|
||||||
VOLUME /downloads /config
|
VOLUME /downloads /config
|
@ -1,36 +1,50 @@
|
|||||||
FROM alpine AS builder
|
FROM alpine AS builder
|
||||||
|
|
||||||
# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261
|
# Download QEMU, see https://github.com/docker/hub-feedback/issues/1261
|
||||||
#ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-aarch64.tar.gz
|
|
||||||
ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v4.0.0-balena/qemu-4.0.0-balena-aarch64.tar.gz
|
ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v4.0.0-balena/qemu-4.0.0-balena-aarch64.tar.gz
|
||||||
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1
|
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1
|
||||||
|
|
||||||
FROM lsiobase/alpine.python3.arm64:3.8
|
FROM lsiobase/alpine:arm64v8-3.12
|
||||||
|
|
||||||
# Add QEMU
|
# Add QEMU
|
||||||
COPY --from=builder qemu-aarch64-static /usr/bin
|
COPY --from=builder qemu-aarch64-static /usr/bin
|
||||||
|
|
||||||
ENV PUID=1000
|
ARG BUILDDATE
|
||||||
ENV PGID=1000
|
|
||||||
|
LABEL \
|
||||||
|
app.deemix.image.created="${BUILDDATE}" \
|
||||||
|
app.deemix.image.url="https://gitlab.com/Bockiii/deemix-docker" \
|
||||||
|
app.deemix.image.title="Docker image for Deemix" \
|
||||||
|
app.deemix.image.description="Docker image for Deemix and the pyweb frontend" \
|
||||||
|
maintainer="Bocki"
|
||||||
|
|
||||||
EXPOSE 9666
|
EXPOSE 9666
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apk update && \
|
echo "**** install build packages ****" && \
|
||||||
apk add --no-cache \
|
apk add --no-cache --virtual=build-dependencies \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
make
|
git \
|
||||||
|
make && \
|
||||||
RUN \
|
echo "**** install packages ****" && \
|
||||||
|
apk add --no-cache \
|
||||||
|
py3-pip \
|
||||||
|
python3 && \
|
||||||
|
echo "**** setup directories ****" && \
|
||||||
mkdir /deem && \
|
mkdir /deem && \
|
||||||
chown abc:abc /deem && \
|
chown abc:abc /deem && \
|
||||||
rm -R /config && \
|
rm -R /config && \
|
||||||
ln -sf /deem/.config/deemix /config && \
|
ln -sf /deem/.config/deemix /config && \
|
||||||
ln -sf /downloads /deem/deemix\ Music
|
ln -sf /downloads /deem/deemix\ Music && \
|
||||||
|
echo "**** clean up ****" && \
|
||||||
|
rm -rf \
|
||||||
|
/root/.cache \
|
||||||
|
/tmp/*
|
||||||
|
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|
||||||
|
EXPOSE 6595
|
||||||
VOLUME /downloads /config
|
VOLUME /downloads /config
|
10
README.md
10
README.md
@ -6,8 +6,6 @@ In order to run this container, you will have to exchange your previous image ta
|
|||||||
|
|
||||||
That should be it, everything else stays the same. You will only get updates if you switch to the new source!
|
That should be it, everything else stays the same. You will only get updates if you switch to the new source!
|
||||||
|
|
||||||
ARM Builds are not working yet as I have to get used to the gitlab CI first.
|
|
||||||
|
|
||||||
|
|
||||||
# deemix-docker
|
# deemix-docker
|
||||||
|
|
||||||
@ -27,7 +25,7 @@ $ docker run -d --name Deemix \
|
|||||||
-e PUID=1000 \
|
-e PUID=1000 \
|
||||||
-e PGID=1000 \
|
-e PGID=1000 \
|
||||||
-e ARL=1234567 \
|
-e ARL=1234567 \
|
||||||
-p 9666:9666 \
|
-p 6595:6595 \
|
||||||
registry.gitlab.com/bockiii/deemix-docker
|
registry.gitlab.com/bockiii/deemix-docker
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -46,7 +44,7 @@ services:
|
|||||||
- PGID=1000
|
- PGID=1000
|
||||||
- ARL=1234567
|
- ARL=1234567
|
||||||
ports:
|
ports:
|
||||||
- 9666:9666
|
- 6595:6595
|
||||||
```
|
```
|
||||||
|
|
||||||
### Updating Deemix
|
### Updating Deemix
|
||||||
@ -65,11 +63,11 @@ The container will look for a new update in the Deemix repo on every start and w
|
|||||||
|
|
||||||
`-e ARL=1234567` - OPTIONAL: If you want Deemix to automatically log in for everyone who opens the website, provide your ARL token via this Environment variable.
|
`-e ARL=1234567` - OPTIONAL: If you want Deemix to automatically log in for everyone who opens the website, provide your ARL token via this Environment variable.
|
||||||
|
|
||||||
`-p 9666:9666` - Port opened for the web interface.
|
`-p 6595:6595` - Port opened for the web interface.
|
||||||
|
|
||||||
`registry.gitlab.com/bockiii/deemix-docker` - This container.
|
`registry.gitlab.com/bockiii/deemix-docker` - This container.
|
||||||
|
|
||||||
To access the web interface, go to http://YOURSERVERIP:9666
|
To access the web interface, go to http://YOURSERVERIP:6595
|
||||||
|
|
||||||
## Tags
|
## Tags
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@ services:
|
|||||||
- PGID=1000
|
- PGID=1000
|
||||||
- ARL=1234567
|
- ARL=1234567
|
||||||
ports:
|
ports:
|
||||||
- 9666:9666
|
- 6595:6595
|
@ -1,16 +0,0 @@
|
|||||||
image: registry.gitlab.com/bockiii/deemix-docker:latest
|
|
||||||
manifests:
|
|
||||||
- image: registry.gitlab.com/bockiii/deemix-docker:amd64
|
|
||||||
platform:
|
|
||||||
architecture: amd64
|
|
||||||
os: linux
|
|
||||||
- image: registry.gitlab.com/bockiii/deemix-docker:arm32v7
|
|
||||||
platform:
|
|
||||||
architecture: arm
|
|
||||||
os: linux
|
|
||||||
variant: v7
|
|
||||||
- image: registry.gitlab.com/bockiii/deemix-docker:arm64v8
|
|
||||||
platform:
|
|
||||||
architecture: arm64
|
|
||||||
os: linux
|
|
||||||
variant: v8
|
|
@ -7,9 +7,9 @@ HOME=/deem
|
|||||||
if [ -f "/config/.arl" ]; then
|
if [ -f "/config/.arl" ]; then
|
||||||
echo "[services.d] Starting with ARL"
|
echo "[services.d] Starting with ARL"
|
||||||
exec \
|
exec \
|
||||||
s6-setuidgid abc python3 /deemix/server.py --serverwide-arl --host 0.0.0.0
|
s6-setuidgid abc python3 /deemix/server.py 6595 --serverwide-arl --host 0.0.0.0
|
||||||
else
|
else
|
||||||
echo "[services.d] Starting without ARL"
|
echo "[services.d] Starting without ARL"
|
||||||
exec \
|
exec \
|
||||||
s6-setuidgid abc python3 /deemix/server.py --host 0.0.0.0
|
s6-setuidgid abc python3 /deemix/server.py 6595 --host 0.0.0.0
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user