Change base image of debug containerfile to alpine

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/22/head
trivernis 2 years ago
parent 699f6b67bc
commit f554690b88
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,29 +1,28 @@
ARG DEBIAN_RELEASE=bullseye ARG BASE_IMAGE=docker.io/alpine:latest
ARG BASE_IMAGE=docker.io/bitnami/minideb:${DEBIAN_RELEASE}
FROM ${BASE_IMAGE} AS base FROM ${BASE_IMAGE} AS base
RUN apt-get update RUN apk update
RUN apt-get install -y \ RUN apk add --no-cache \
build-essential \ build-base \
libssl-dev \ openssl3-dev \
libgtk-3-dev \ gtk+3.0-dev \
libappindicator3-0.1-cil-dev \ libappindicator-dev \
patchelf \ patchelf \
librsvg2-dev \ librsvg-dev \
curl \ curl \
wget \ wget \
pkg-config \
clang \ clang \
nodejs \ nodejs \
npm \ npm \
libsoup2.4-dev \ libsoup-dev \
libwebkit2gtk-4.0-dev \ webkit2gtk-dev \
file \ file \
python python3 \
RUN apt remove cmdtest -y bash \
protoc
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}" ENV PATH="/root/.cargo/bin:${PATH}"
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ /var/cache RUN rm -rf /var/lib/{cache,log}/ /var/cache
FROM base AS sources FROM base AS sources
WORKDIR /usr/src WORKDIR /usr/src
@ -40,4 +39,4 @@ RUN python3 scripts/build.py daemon --verbose
FROM sources AS build_ui FROM sources AS build_ui
WORKDIR /usr/src WORKDIR /usr/src
RUN python3 scripts/build.py ui --verbose RUN python3 scripts/build.py ui --verbose --bundles deb

@ -69,7 +69,10 @@ def build(component: str, bundles: List[str] = None):
def build_daemon(): def build_daemon():
'''Builds daemon''' '''Builds daemon'''
cargo('fetch', 'mediarepo-daemon') cargo('fetch', 'mediarepo-daemon')
cargo('build --release --frozen', 'mediarepo-daemon') additional_flags = ''
if verbose:
additional_flags = '--verbose'
cargo('build --release --frozen ' + additional_flags, 'mediarepo-daemon')
if windows: if windows:
store_artifact('mediarepo-daemon/target/release/mediarepo-daemon.exe') store_artifact('mediarepo-daemon/target/release/mediarepo-daemon.exe')
@ -81,10 +84,15 @@ def build_ui(bundles: List[str] = None):
'''Builds UI''' '''Builds UI'''
yarn('install', 'mediarepo-ui') yarn('install', 'mediarepo-ui')
additional_flags = ''
if verbose:
additional_flags = '--verbose'
if bundles is not None: if bundles is not None:
cargo('tauri build --bundles ' + ' '.join(bundles), 'mediarepo-ui') cargo('tauri build --bundles ' + ' '.join(bundles) + ' ' + additional_flags, 'mediarepo-ui')
else: else:
cargo('tauri build ', 'mediarepo-ui') cargo('tauri build ' + additional_flags, 'mediarepo-ui')
if windows: if windows:
store_artifact( store_artifact(

Loading…
Cancel
Save