mirror of
https://gitlab.com/Bockiii/deemix-docker.git
synced 2024-08-30 17:32:18 +00:00
Build internally with multistage
This commit is contained in:
parent
81989e1c9d
commit
e51b1f794a
37
Dockerfile
37
Dockerfile
@ -1,3 +1,22 @@
|
||||
FROM lsiobase/ubuntu:focal as builder
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash && \
|
||||
apt-get -y --no-install-recommends install >/dev/null \
|
||||
nodejs \
|
||||
git && \
|
||||
npm install --global yarn
|
||||
|
||||
RUN git clone https://gitlab.com/RemixDev/deemix-gui.git --recursive
|
||||
|
||||
WORKDIR /deemix-gui
|
||||
|
||||
RUN yarn config set network-timeout 1000000 -g && \
|
||||
yarn install-all && \
|
||||
yarn build-server && \
|
||||
yarn build-webui && \
|
||||
yarn cache clean && \
|
||||
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' \;
|
||||
|
||||
FROM lsiobase/ubuntu:focal
|
||||
|
||||
ARG BUILDDATE
|
||||
@ -10,19 +29,19 @@ LABEL \
|
||||
app.deemix.image.description="Docker image for Deemix" \
|
||||
maintainer="Bocki"
|
||||
|
||||
COPY --from=builder /deemix-gui /deemix-gui
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash && \
|
||||
apt-get -y --no-install-recommends install >/dev/null \
|
||||
nodejs \
|
||||
jq \
|
||||
iputils-ping \
|
||||
curl \
|
||||
git && \
|
||||
curl && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
npm install --global yarn
|
||||
|
||||
RUN git clone https://gitlab.com/RemixDev/deemix-gui.git --recursive && \
|
||||
rm -R /config && \
|
||||
RUN rm -R /config && \
|
||||
mkdir /deemix-gui/server/music && \
|
||||
mkdir -p /deem/.config/deemix && \
|
||||
ln -sf /deemix-gui/server/music /downloads && \
|
||||
@ -30,9 +49,13 @@ RUN git clone https://gitlab.com/RemixDev/deemix-gui.git --recursive && \
|
||||
|
||||
WORKDIR /deemix-gui
|
||||
|
||||
RUN yarn install --prod --network-timeout 1000000 && \
|
||||
yarn --cwd server install --prod --network-timeout 1000000 && \
|
||||
yarn cache clean
|
||||
RUN yarn config set network-timeout 1000000 -g && \
|
||||
yarn install --prod && \
|
||||
yarn --cwd server install --prod && \
|
||||
yarn cache clean
|
||||
|
||||
|
||||
WORKDIR /deemix-gui
|
||||
|
||||
COPY root/ /
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
deemix:
|
||||
image: registry.gitlab.com/bockiii/deemix-docker
|
||||
container_name: Deemix
|
||||
volumes:
|
||||
- /your/storage/path/:/downloads
|
||||
- /your/config/location:/config
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- UMASK_SET=022
|
||||
ports:
|
||||
- 6595:6595
|
||||
deemix:
|
||||
image: registry.gitlab.com/bockiii/deemix-docker
|
||||
container_name: Deemix
|
||||
volumes:
|
||||
- /your/storage/path/:/downloads
|
||||
- /your/config/location:/config
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- UMASK_SET=022
|
||||
ports:
|
||||
- 6595:6595
|
Loading…
Reference in New Issue
Block a user