This repository was archived by the owner on Mar 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (49 loc) · 1.52 KB
/
Dockerfile
File metadata and controls
57 lines (49 loc) · 1.52 KB
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
55
56
57
# docker-flashprint
# Incompatible Qt version on Buster
from debian:stretch-20190506-slim
LABEL maintainer="Anders Draagen <andersdra@gmail.com>"
ARG FLASHPRINT_RAR_URL='https://www.flashforge.com/wp-content/uploads/2017/04/flashprint_3.24.0_Linux64.rar'
ARG C_USER=flashprint
ARG C_UID=1000
ARG C_GUID=1000
ADD ${FLASHPRINT_RAR_URL} /tmp
RUN apt-get update \
&& apt-get install --yes --no-install-recommends \
libglu1-mesa \
libgl1-mesa-dri \
libudev-dev \
libqt5gui5 \
libqt5core5a \
libqt5opengl5 \
libqt5network5 \
libqt5xml5 \
unrar-free \
&& unrar -x /tmp/flashprint_*_Linux64.rar /tmp \
&& dpkg -i /tmp/flashprint_*_amd64.deb \
&& apt-get --fix-broken --yes install \
&& groupadd \
--system ${C_USER} \
--gid ${C_GUID} \
&& useradd \
--no-log-init --uid ${C_UID} \
--system --gid ${C_USER} \
--create-home --home-dir /${C_USER} \
--shell /sbin/nologin \
--comment \"${C_USER}\" ${C_USER} \
&& chmod 771 /${C_USER} \
&& rm -rf /tmp/* && chown -R ${C_USER}:${C_USER} /${C_USER} \
&& apt-get -qq purge --auto-remove --yes --allow-remove-essential \
systemd \
systemd-sysv \
&& apt-get -qq remove --yes unrar-free \
&& apt-get -qq clean autoclean \
&& apt-get -qq autoremove --yes \
&& rm -rf /usr/share/man/* \
&& rm -rf /tmp/* \
&& rm -rf /var/log/* \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
ENV USER=${C_USER}
ENV HOME=/${C_USER}
USER ${C_USER}
WORKDIR /${C_USER}
CMD ["/usr/share/FlashPrint/FlashPrint"]