forked from SpaceinvaderOne/Macinabox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (43 loc) · 2.26 KB
/
Dockerfile
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
46
47
48
49
50
51
52
53
54
# Pull base build image.
FROM alpine:3.12 AS builder
# Install packages.
RUN apk add \
bash libressl-dev xterm dbus-x11 \
py3-gobject3 libosinfo libxml2 build-base python3 py3-docutils \
gtk+3.0-dev vte3 py3-libxml2 spice-gtk gtk-vnc py3-cairo\
ttf-dejavu gnome-icon-theme dconf intltool grep gettext-dev \
libvirt-glib py3-urlgrabber py3-ipaddr py3-libvirt \
py3-requests py3-urllib3 py3-chardet py3-certifi py3-idna \
perl-dev cdrkit git && \
apk add openssh-askpass --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
&& rm -rf /var/cache/apk/* /tmp/* /tmp/.[!.]*
# Download virt-manager from git
RUN git clone https://github.com/virt-manager/virt-manager.git
# Install virt-manager with script from developer
RUN cd virt-manager && ./setup.py configure --prefix=/usr/local && ./setup.py install --exec-prefix=/usr/local
# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.12
# Install packages.
RUN apk add \
py3-libvirt py3-libxml2 py3-ipaddr py3-cairo py3-requests py3-gobject3 py3-pip py3-click --upgrade \
libosinfo libvirt-glib dbus-x11 gtksourceview4 \
bash libressl dconf grep cdrkit gtk-vnc vte3 qemu-img rsync p7zip \
gnome-icon-theme adwaita-icon-theme && \
apk add py3-configparser --repository http://dl-3.alpinelinux.org/alpine/v3.10/community/ && \
apk add openssh-askpass py3-argcomplete dmg2img --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
&& rm -rf /var/cache/apk/* /tmp/* /tmp/.[!.]* /usr/share/icons/Adwaita/cursors /usr/share/icons/gnome/256x256 && \
# Virt-manager wants ssh-askpass without "gtk" in the name
ln -s /usr/lib/ssh/gtk-ssh-askpass /usr/lib/ssh/ssh-askpass
# Copy macinabox files
COPY . /Macinabox
# Generate and install favicons.
RUN \
APP_ICON_URL=https://raw.githubusercontent.com/SpaceinvaderOne/Docker-Templates-Unraid/master/spaceinvaderone/docker_icons/Macinabox.png && \
install_app_icon.sh "$APP_ICON_URL" \
&& rm -rf /var/cache/apk/*
COPY machineid_fix.sh /etc/cont-init.d/20-machineid_fix.sh
COPY startapp.sh /startapp.sh
# Copy Virt-Manager from base build image.
COPY --from=builder /usr/local /usr/local
# Set the name of the application.
ENV APP_NAME="Macinabox with VirtManager"