mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2025-12-18 02:49:01 +02:00
optimized docker file
This commit is contained in:
62
Dockerfile
62
Dockerfile
@@ -4,38 +4,72 @@ MAINTAINER Andre Germann <https://buanet.de>
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential python apt-utils curl avahi-daemon git libpcap-dev libavahi-compat-libdnssd-dev libfontconfig gnupg2 locales procps libudev-dev libpam0g-dev unzip sudo wget ffmpeg android-tools-adb android-tools-fastboot
|
||||
# Install necessary packages
|
||||
RUN apt-get update && apt-get install -y \
|
||||
android-tools-adb \
|
||||
android-tools-fastboot \
|
||||
apt-utils \
|
||||
avahi-daemon \
|
||||
build-essential \
|
||||
curl \
|
||||
ffmpeg \
|
||||
git \
|
||||
gnupg2 \
|
||||
libavahi-compat-libdnssd-dev \
|
||||
libfontconfig \
|
||||
libpam0g-dev \
|
||||
libpcap-dev \
|
||||
libudev-dev \
|
||||
locales \
|
||||
procps \
|
||||
python \
|
||||
sudo \
|
||||
unzip \
|
||||
wget \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install node8
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
|
||||
RUN apt-get install -y nodejs
|
||||
RUN apt-get update && apt-get install -y \
|
||||
nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configure avahi-daemon
|
||||
RUN sed -i '/^rlimit-nproc/s/^\(.*\)/#\1/g' /etc/avahi/avahi-daemon.conf
|
||||
RUN sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \dpkg-reconfigure --frontend=noninteractive locales && \update-locale LANG=de_DE.UTF-8
|
||||
|
||||
# Configure locales/ language/ timezone
|
||||
RUN sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen \
|
||||
&& \dpkg-reconfigure --frontend=noninteractive locales \
|
||||
&& \update-locale LANG=de_DE.UTF-8
|
||||
ENV LANG de_DE.UTF-8
|
||||
RUN cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
||||
ENV TZ Europe/Berlin
|
||||
|
||||
# RUN mkdir -p /opt/iobroker/ && chmod 777 /opt/iobroker/
|
||||
RUN mkdir -p /opt/scripts/ && chmod 777 /opt/scripts/
|
||||
|
||||
# Create scripts directory and copy scripts
|
||||
RUN mkdir -p /opt/scripts/ \
|
||||
&& chmod 777 /opt/scripts/
|
||||
WORKDIR /opt/scripts/
|
||||
|
||||
ADD scripts/avahi_startup.sh avahi_startup.sh
|
||||
RUN chmod +x avahi_startup.sh
|
||||
RUN mkdir /var/run/dbus/
|
||||
|
||||
ADD scripts/iobroker_startup.sh iobroker_startup.sh
|
||||
RUN chmod +x iobroker_startup.sh
|
||||
RUN chmod +x avahi_startup.sh \
|
||||
&& chmod +x iobroker_startup.sh \
|
||||
&& mkdir /var/run/dbus/
|
||||
|
||||
# Install ioBroker
|
||||
WORKDIR /
|
||||
RUN echo $(hostname) > /opt/scripts/.install_host \
|
||||
&& apt-get update \
|
||||
&& curl -sL https://raw.githubusercontent.com/ioBroker/ioBroker/stable-installer/installer.sh | bash - \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN echo $(hostname) > /opt/scripts/.install_host && curl -sL https://raw.githubusercontent.com/ioBroker/ioBroker/stable-installer/installer.sh | bash -
|
||||
# RUN update-rc.d iobroker.sh remove
|
||||
|
||||
# Install node-gyp
|
||||
WORKDIR /opt/iobroker/
|
||||
RUN npm install node-gyp -g
|
||||
|
||||
# Backup initial ioBroker-folder
|
||||
RUN tar -cf /opt/initial_iobroker.tar /opt/iobroker
|
||||
|
||||
# Run startup-script
|
||||
CMD ["sh", "/opt/scripts/iobroker_startup.sh"]
|
||||
|
||||
ENV DEBIAN_FRONTEND teletype
|
||||
|
||||
Reference in New Issue
Block a user