FROM debian:latest MAINTAINER Andre Germann ENV DEBIAN_FRONTEND noninteractive # Install prerequisites RUN apt-get update && apt-get upgrade -y && apt-get install -y \ acl \ apt-utils \ build-essential \ curl \ git \ gnupg2 \ libavahi-compat-libdnssd-dev \ libcap2-bin \ libpam0g-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 update && apt-get install -y \ nodejs \ && rm -rf /var/lib/apt/lists/* # 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 #RUN cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime # Create scripts directory and copy scripts RUN mkdir -p /opt/scripts/ \ && chmod 777 /opt/scripts/ WORKDIR /opt/scripts/ COPY scripts/iobroker_startup.sh iobroker_startup.sh COPY scripts/setup_avahi.sh setup_avahi.sh COPY scripts/setup_packages.sh setup_packages.sh RUN chmod +x iobroker_startup.sh \ && chmod +x setup_avahi.sh \ && chmod +x setup_packages.sh # Install ioBroker WORKDIR / RUN apt-get update \ && curl -sL https://raw.githubusercontent.com/ioBroker/ioBroker/stable-installer/installer.sh | bash - \ && echo $(hostname) > /opt/iobroker/.install_host \ && rm -rf /var/lib/apt/lists/* # Install node-gyp WORKDIR /opt/iobroker/ RUN npm install -g node-gyp # Backup initial ioBroker-folder RUN tar -cf /opt/initial_iobroker.tar /opt/iobroker # Giving iobroker-user sudo rights #RUN echo 'iobroker ALL=(ALL) NOPASSWD: ALL' | EDITOR='tee -a' visudo \ # && echo "iobroker:iobroker" | chpasswd \ # && adduser iobroker sudo USER iobroker # Setting up ENV ENV DEBIAN_FRONTEND="teletype" \ LANG="de_DE.UTF-8" \ TZ="Europe/Berlin" \ PACKAGES="nano" \ AVAHI="false" # Setting up EXPOSE for Admin EXPOSE 8081/tcp # Run startup-script CMD ["sh", "/opt/scripts/iobroker_startup.sh"]