Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (52 sloc) 1.74 KB
FROM resin/%%RESIN_MACHINE_NAME%%-node:6.9
# debian httpredir mirror proxy often ends up with 404s - editing source file to avoid it
RUN sed -i "s!httpredir.debian.org!`curl -s -D - http://httpredir.debian.org/demo/debian/ | awk '/^Link:/ { print $2 }' | sed -e 's@<http://\(.*\)/debian/>;@\1@g'`!" /etc/apt/sources.list
COPY debian-pinning /etc/apt/preferences.d/
# Install other apt deps
RUN apt-get update && apt-get install -y \
apt-utils \
clang \
xserver-xorg-core \
xserver-xorg-input-all \
xserver-xorg-video-fbdev \
xorg \
libdbus-1-dev \
libgtk2.0-dev \
libnotify-dev \
libgnome-keyring-dev \
libgconf2-dev \
libasound2-dev \
libcap-dev \
libcups2-dev \
libxtst-dev \
libxss1 \
libnss3-dev \
fluxbox \
libsmbclient \
libssh-4 \
fbset \
libexpat-dev\
libxtst-dev \
libpng-dev && rm -rf /var/lib/apt/lists/*
# Set Xorg and FLUXBOX preferences
RUN mkdir ~/.fluxbox
RUN echo "xset s off" > ~/.fluxbox/startup && echo "xserver-command=X -s 0 dpms" >> ~/.fluxbox/startup
RUN echo "#!/bin/bash" > /etc/X11/xinit/xserverrc \
&& echo "" >> /etc/X11/xinit/xserverrc \
&& echo 'exec /usr/bin/X -s 0 dpms -nocursor -nolisten tcp "$@"' >> /etc/X11/xinit/xserverrc
# Move to app dir
WORKDIR /usr/src/app
# Move package.json and deps.sh to filesystem
COPY "./app/package.json" ./
COPY "./app/deps.sh" ./
# Install npm modules for the application
RUN JOBS=MAX npm install --unsafe-perm --production \
&& npm cache clean && node_modules/.bin/electron-rebuild
# Move app to filesystem
COPY ./app ./
## uncomment if you want systemd
ENV INITSYSTEM on
# Change timezone
RUN echo America/Costa_Rica | sudo tee /etc/timezone && sudo dpkg-reconfigure --frontend noninteractive tzdata
# Start app
CMD ["bash", "/usr/src/app/start.sh"]