This repository has been archived by the owner on Apr 20, 2022. It is now read-only.
forked from balena-io-experimental/balena-octoprint
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
octodash: Base default Dockerfile on binary installation, since build…
…ing is difficult UnchartedBull/OctoDash#760
- Loading branch information
1 parent
10e0470
commit ddff60f
Showing
4 changed files
with
102 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:buster | ||
|
||
ARG VERSION=1.5.0 | ||
|
||
RUN install_packages \ | ||
xserver-xorg-core \ | ||
xserver-xorg-input-all \ | ||
xserver-xorg-video-fbdev \ | ||
xorg \ | ||
libgtk3.0 \ | ||
libnss3 \ | ||
libxss1 \ | ||
libasound2 \ | ||
jq | ||
|
||
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 | ||
|
||
WORKDIR /usr/src/app | ||
COPY ./start.sh ./start.sh | ||
COPY config.json /root/.config/octodash/config.json | ||
|
||
RUN curl -sL https://github.com/UnchartedBull/OctoDash/releases/download/v""$VERSION""/octodash_""$VERSION""_$(uname -m).deb -o octodash.deb && \ | ||
dpkg -i --ignore-depends=libnotify4,xdg-utils,libappindicator3-1,libsecret-1-0 octodash.deb && \ | ||
rm octodash.deb | ||
|
||
CMD ["bash","/usr/src/app/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
### | ||
# Build stage | ||
## | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-node:latest-build as build | ||
ARG octodash_version=v1.5.0 | ||
RUN echo "arch=$(uname -m)" > ~/.npmrc | ||
|
||
# Move to app dir | ||
WORKDIR /usr/src/app | ||
|
||
# Install build dependencies | ||
RUN install_packages \ | ||
apt-utils \ | ||
clang \ | ||
libxcb-image0 \ | ||
libxcb-util0 \ | ||
xdg-utils \ | ||
libdbus-1-dev \ | ||
libgtk2.0-dev \ | ||
libnotify-dev \ | ||
libgnome-keyring-dev \ | ||
libgconf2-dev \ | ||
libasound2-dev \ | ||
libcap-dev \ | ||
libcups2-dev \ | ||
libxtst-dev \ | ||
libxss1 \ | ||
libnss3-dev \ | ||
libsmbclient \ | ||
libssh-4 \ | ||
libexpat-dev \ | ||
git | ||
|
||
# Clone project to filesystem, checkout octodash_version and remove git index to save space | ||
RUN git clone https://github.com/UnchartedBull/OctoDash.git && cd OctoDash && git checkout $octodash_version && rm -rf .git | ||
|
||
# Install npm modules for the application and compile | ||
RUN cd OctoDash && npm install && npm run ng:build | ||
|
||
### | ||
# Runtime | ||
## | ||
FROM balenalib/%%BALENA_MACHINE_NAME%%-node:latest-run | ||
RUN echo "arch=$(uname -m)" > ~/.npmrc | ||
|
||
# Move to app dir | ||
WORKDIR /usr/src/app | ||
|
||
# Install runtime dependencies | ||
|
||
RUN install_packages \ | ||
xserver-xorg-core \ | ||
xserver-xorg-input-all \ | ||
xserver-xorg-video-fbdev \ | ||
xorg \ | ||
libgtk3.0 \ | ||
libnss3 \ | ||
libxss1 \ | ||
libasound2 \ | ||
jq | ||
|
||
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 | ||
|
||
# Copy the app from the build step | ||
COPY --from=build /usr/src/app/OctoDash /usr/src/app/OctoDash | ||
|
||
COPY ./start.sh /usr/src/app/start.sh | ||
COPY config.json /root/.config/octodash/config.json | ||
|
||
CMD ["bash","/usr/src/app/start.sh"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./Dockerfile.binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters