mirror of
https://github.com/helfrichmichael/prusaslicer-novnc.git
synced 2024-08-30 18:32:27 +00:00
Simplified the Dockerfile further and also fixed the build and push script to properly push the tagged builds.
This commit is contained in:
parent
a0496dbe97
commit
383c465fa6
21
Dockerfile
21
Dockerfile
@ -12,37 +12,26 @@ RUN apt-get update -y && \
|
|||||||
rm -rf /var/lib/apt/lists && \
|
rm -rf /var/lib/apt/lists && \
|
||||||
mkdir -p /usr/share/desktop-directories
|
mkdir -p /usr/share/desktop-directories
|
||||||
|
|
||||||
# Get all of the remaining dependencies for the OS and VNC.
|
# Get all of the remaining dependencies for the OS, VNC, and Prusaslicer.
|
||||||
RUN apt-get update -y && \
|
RUN apt-get update -y && \
|
||||||
apt-get install -y --no-install-recommends lxterminal nano wget openssh-client rsync ca-certificates xdg-utils htop tar xzip gzip bzip2 zip unzip && \
|
apt-get install -y --no-install-recommends lxterminal nano wget openssh-client rsync ca-certificates xdg-utils htop tar xzip gzip bzip2 zip unzip && \
|
||||||
rm -rf /var/lib/apt/lists
|
rm -rf /var/lib/apt/lists
|
||||||
|
|
||||||
RUN apt update && apt install -y --no-install-recommends --allow-unauthenticated \
|
RUN apt update && apt install -y --no-install-recommends --allow-unauthenticated \
|
||||||
lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
|
lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
|
||||||
freeglut3 libgtk2.0-dev libwxgtk3.0-gtk3-dev libwx-perl libxmu-dev libgl1-mesa-glx libgl1-mesa-dri xdg-utils locales pcmanfm \
|
freeglut3 libgtk2.0-dev libwxgtk3.0-gtk3-dev libwx-perl libxmu-dev libgl1-mesa-glx libgl1-mesa-dri \
|
||||||
|
xdg-utils locales locales-all pcmanfm jq curl git \
|
||||||
&& apt autoclean -y \
|
&& apt autoclean -y \
|
||||||
&& apt autoremove -y \
|
&& apt autoremove -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Set the locale to US English UTF-8, as this is required for Prusaslicer to work. We also provide all locales to support all languages.
|
# Install Prusaslicer
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get install -y locales locales-all
|
|
||||||
ENV LC_ALL en_US.UTF-8
|
|
||||||
ENV LANG en_US.UTF-8
|
|
||||||
ENV LANGUAGE en_US.UTF-8
|
|
||||||
|
|
||||||
# Install Prusaslicer and its dependencies.
|
|
||||||
# Many of the commands below were derived and pulled from previous work by dmagyar on GitHub.
|
# Many of the commands below were derived and pulled from previous work by dmagyar on GitHub.
|
||||||
# Here's their Dockerfile for reference https://github.com/dmagyar/prusaslicer-vnc-docker/blob/main/Dockerfile.amd64
|
# Here's their Dockerfile for reference https://github.com/dmagyar/prusaslicer-vnc-docker/blob/main/Dockerfile.amd64
|
||||||
WORKDIR /slic3r
|
WORKDIR /slic3r
|
||||||
ADD get_latest_prusaslicer_release.sh /slic3r
|
ADD get_latest_prusaslicer_release.sh /slic3r
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN chmod +x /slic3r/get_latest_prusaslicer_release.sh \
|
||||||
jq \
|
|
||||||
curl \
|
|
||||||
git \
|
|
||||||
--no-install-recommends \
|
|
||||||
&& chmod +x /slic3r/get_latest_prusaslicer_release.sh \
|
|
||||||
&& latestSlic3r=$(/slic3r/get_latest_prusaslicer_release.sh url) \
|
&& latestSlic3r=$(/slic3r/get_latest_prusaslicer_release.sh url) \
|
||||||
&& slic3rReleaseName=$(/slic3r/get_latest_prusaslicer_release.sh name) \
|
&& slic3rReleaseName=$(/slic3r/get_latest_prusaslicer_release.sh name) \
|
||||||
&& curl -sSL ${latestSlic3r} > ${slic3rReleaseName} \
|
&& curl -sSL ${latestSlic3r} > ${slic3rReleaseName} \
|
||||||
|
@ -9,10 +9,11 @@ tag=$image:$timestamp
|
|||||||
latest=$image:latest
|
latest=$image:latest
|
||||||
|
|
||||||
# Build the image -- tagged with the timestamp.
|
# Build the image -- tagged with the timestamp.
|
||||||
docker build -t $tag .
|
docker build -t $tag -t $latest .
|
||||||
|
|
||||||
# Push with the latest tag and the timestamp tag to Docker Hub.
|
# Push with the timestamped tag, and latest image tag to Docker Hub.
|
||||||
docker login
|
docker login
|
||||||
|
docker push $tag
|
||||||
docker push $latest
|
docker push $latest
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
Loading…
Reference in New Issue
Block a user