Rebase, port fix and changelog

This commit is contained in:
Henning Bocklage 2020-06-11 20:45:28 +02:00
parent 9c0ad0e7f0
commit a92efee3a8
9 changed files with 115 additions and 83 deletions

View File

@ -7,26 +7,31 @@ stages:
variables:
IMAGE: registry.gitlab.com/bockiii/deemix-docker
IMAGE_TAG: latest
DOCKER_CLI_EXPERIMENTAL: enabled
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- apk add --update curl && rm -rf /var/cache/apk/*
- export CI_JOB_TIMESTAMP=$(date --utc -Iseconds)
build:
stage: build
script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
- docker build --pull -f Dockerfile.arm64v8 -t $IMAGE:arm64v8 .
- docker push $IMAGE:arm64v8
- docker build --pull -f Dockerfile.arm32v7 -t $IMAGE:arm32v7 .
- docker push $IMAGE:arm32v7
- docker build --pull -t $IMAGE:amd64 .
- docker push $IMAGE:amd64
- set -e
- HOST_ARCH=$(uname -m)
- HOST_ARCH_ALIAS=$([[ "${HOST_ARCH}" == "x86_64" ]] && echo "amd64" || echo "${HOST_ARCH}")
- MANIFEST_TOOL_VERSION=$(curl -s https://api.github.com/repos/estesp/manifest-tool/releases/latest | grep 'tag_name' | cut -d\" -f4)
- curl -L https://github.com/estesp/manifest-tool/releases/download/$MANIFEST_TOOL_VERSION/manifest-tool-linux-$HOST_ARCH_ALIAS -o manifest-tool
- chmod +x manifest-tool
- ./manifest-tool push from-spec manifest.yaml
- docker build --pull -f Dockerfile.arm64v8 --build-arg BUILDDATE=$CI_JOB_TIMESTAMP -t $IMAGE:arm64v8-${IMAGE_TAG} .
- docker build --pull -f Dockerfile.arm32v7 --build-arg BUILDDATE=$CI_JOB_TIMESTAMP -t $IMAGE:arm32v7-${IMAGE_TAG} .
- docker build --pull --build-arg BUILDDATE=$CI_JOB_TIMESTAMP -t $IMAGE:amd64-${IMAGE_TAG} .
- docker push $IMAGE:arm64v8-${IMAGE_TAG}
- docker push $IMAGE:arm32v7-${IMAGE_TAG}
- docker push $IMAGE:amd64-${IMAGE_TAG}
- docker manifest create "$IMAGE:${IMAGE_TAG}"
"$IMAGE:amd64-${IMAGE_TAG}"
"$IMAGE:arm32v7-${IMAGE_TAG}"
"$IMAGE:arm64v8-${IMAGE_TAG}"
- docker manifest annotate "$IMAGE:${IMAGE_TAG}" "$IMAGE:arm32v7-${IMAGE_TAG}" --os=linux --arch=arm --variant=v7
- docker manifest annotate "$IMAGE:${IMAGE_TAG}" "$IMAGE:arm64v8-${IMAGE_TAG}" --os=linux --arch=arm64 --variant=v8
# 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
View 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.

View File

@ -1,27 +1,39 @@
FROM lsiobase/alpine.python3:3.9
FROM lsiobase/alpine:3.12
ENV PUID=1000
ENV PGID=1000
ARG BUILDDATE
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 \
apk update && \
apk add --no-cache \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
gcc \
g++ \
libffi-dev \
python3-dev \
make
RUN \
mkdir /deem && \
chown abc:abc /deem && \
rm -R /config && \
ln -sf /deem/.config/deemix /config && \
ln -sf /downloads /deem/deemix\ Music
git \
make && \
echo "**** install packages ****" && \
apk add --no-cache \
py3-pip \
python3 && \
echo "**** setup directories ****" && \
mkdir /deem && \
chown abc:abc /deem && \
rm -R /config && \
ln -sf /deem/.config/deemix /config && \
ln -sf /downloads /deem/deemix\ Music && \
echo "**** clean up ****" && \
rm -rf \
/root/.cache \
/tmp/*
COPY root/ /
VOLUME /downloads /config
EXPOSE 6595
VOLUME /downloads /config

View File

@ -1,36 +1,49 @@
FROM alpine AS builder
# 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
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
COPY --from=builder qemu-arm-static /usr/bin
ENV PUID=1000
ENV PGID=1000
ARG BUILDDATE
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 \
apk update && \
apk add --no-cache \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
gcc \
g++ \
libffi-dev \
python3-dev \
make
RUN \
mkdir /deem && \
chown abc:abc /deem && \
rm -R /config && \
ln -sf /deem/.config/deemix /config && \
ln -sf /downloads /deem/deemix\ Music
git \
make && \
echo "**** install packages ****" && \
apk add --no-cache \
py3-pip \
python3 && \
echo "**** setup directories ****" && \
mkdir /deem && \
chown abc:abc /deem && \
rm -R /config && \
ln -sf /deem/.config/deemix /config && \
ln -sf /downloads /deem/deemix\ Music && \
echo "**** clean up ****" && \
rm -rf \
/root/.cache \
/tmp/*
COPY root/ /
EXPOSE 6595
VOLUME /downloads /config

View File

@ -1,36 +1,50 @@
FROM alpine AS builder
# 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
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
COPY --from=builder qemu-aarch64-static /usr/bin
ENV PUID=1000
ENV PGID=1000
ARG BUILDDATE
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
RUN \
apk update && \
apk add --no-cache \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
gcc \
g++ \
libffi-dev \
python3-dev \
make
RUN \
mkdir /deem && \
chown abc:abc /deem && \
rm -R /config && \
ln -sf /deem/.config/deemix /config && \
ln -sf /downloads /deem/deemix\ Music
git \
make && \
echo "**** install packages ****" && \
apk add --no-cache \
py3-pip \
python3 && \
echo "**** setup directories ****" && \
mkdir /deem && \
chown abc:abc /deem && \
rm -R /config && \
ln -sf /deem/.config/deemix /config && \
ln -sf /downloads /deem/deemix\ Music && \
echo "**** clean up ****" && \
rm -rf \
/root/.cache \
/tmp/*
COPY root/ /
EXPOSE 6595
VOLUME /downloads /config

View File

@ -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!
ARM Builds are not working yet as I have to get used to the gitlab CI first.
# deemix-docker
@ -27,7 +25,7 @@ $ docker run -d --name Deemix \
-e PUID=1000 \
-e PGID=1000 \
-e ARL=1234567 \
-p 9666:9666 \
-p 6595:6595 \
registry.gitlab.com/bockiii/deemix-docker
```
@ -46,7 +44,7 @@ services:
- PGID=1000
- ARL=1234567
ports:
- 9666:9666
- 6595:6595
```
### 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.
`-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.
To access the web interface, go to http://YOURSERVERIP:9666
To access the web interface, go to http://YOURSERVERIP:6595
## Tags

View File

@ -11,4 +11,4 @@ services:
- PGID=1000
- ARL=1234567
ports:
- 9666:9666
- 6595:6595

View File

@ -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

View File

@ -7,9 +7,9 @@ HOME=/deem
if [ -f "/config/.arl" ]; then
echo "[services.d] Starting with ARL"
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
echo "[services.d] Starting without ARL"
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