forked from Trivernis/mediarepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile
45 lines (40 loc) · 999 Bytes
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ARG BASE_IMAGE=docker.io/alpine:latest
FROM ${BASE_IMAGE} AS base
RUN apk update
RUN apk add --no-cache \
build-base \
openssl3-dev \
gtk+3.0-dev \
libappindicator-dev \
patchelf \
librsvg-dev \
curl \
wget \
clang \
nodejs \
npm \
libsoup-dev \
webkit2gtk-dev \
file \
python3 \
bash \
protoc
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rm -rf /var/lib/{cache,log}/ /var/cache
FROM base AS sources
WORKDIR /usr/src
COPY mediarepo-api ./mediarepo-api
COPY mediarepo-daemon ./mediarepo-daemon
COPY mediarepo-ui ./mediarepo-ui
COPY scripts ./scripts
RUN python3 scripts/clean.py
RUN python3 scripts/check.py --install
FROM sources AS build_daemon
WORKDIR /usr/src
RUN python3 scripts/build.py daemon --verbose
RUN mkdir ./test-repo
RUN ./out/mediarepo-daemon --repo ./test-repo init
FROM sources AS build_ui
WORKDIR /usr/src
RUN python3 scripts/build.py ui --verbose --bundles deb