Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opengl images #6

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openscad/buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ RUN apt-get install -y --no-install-recommends \

# Dev dependencies
RUN apt-get -y install --no-install-recommends \
build-essential curl libffi-dev libxmu-dev cmake bison flex \
build-essential curl libffi-dev libxmu-dev cmake bison flex \
git-core libboost-all-dev libmpfr-dev libboost-dev libglew-dev \
libcairo2-dev libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev \
libcairo2-dev libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev \
libgmp-dev imagemagick libfreetype6-dev libdouble-conversion-dev \
gtk-doc-tools libglib2.0-dev gettext pkg-config ragel libxi-dev \
libfontconfig-dev libzip-dev lib3mf-dev libharfbuzz-dev libxml2-dev \
Expand Down
81 changes: 81 additions & 0 deletions openscad/focal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
FROM ubuntu:20.04 AS builder

ARG GITHUB_USER=openscad
ARG GITHUB_REPO=openscad
ARG BRANCH=master
ARG REFS=heads
ARG OPENSCAD_VERSION=
ARG SNAPSHOT=+
ARG DEBUG=-
ARG JOBS=1
ARG COMMIT=true

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get -y full-upgrade

# Base setup
RUN apt-get install -y --no-install-recommends \
apt-utils apt-transport-https ca-certificates git wget jq

# Dev dependencies
RUN apt-get -y install --no-install-recommends \
build-essential curl libffi-dev libxmu-dev cmake bison flex \
git-core libboost-all-dev libmpfr-dev libboost-dev libglew-dev \
libcairo2-dev libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev \
libgmp-dev imagemagick libfreetype6-dev libdouble-conversion-dev \
gtk-doc-tools libglib2.0-dev gettext pkg-config ragel libxi-dev \
libfontconfig-dev libzip-dev lib3mf-dev libharfbuzz-dev libxml2-dev \
qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev libqt5svg5-dev \
qtmultimedia5-dev libqt5multimedia5-plugins qt5-default

WORKDIR /openscad

# Invalidate docker cache if the branch changes
ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json

RUN \
cat version.json | jq . && rm -f version.json && \
git clone "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
git checkout "${BRANCH}" && \
git rev-parse --abbrev-ref HEAD && \
git log -n8 --pretty=tformat:"%h %ai (%aN) %s"

RUN \
git submodule update --init && \
export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
qmake -v && \
qmake -d \
PREFIX=/usr/local \
VERSION="$OPENSCAD_VERSION" \
OPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
CONFIG+=qopenglwidget \
CONFIG${SNAPSHOT}=experimental \
CONFIG${SNAPSHOT}=snapshot \
CONFIG${DEBUG}=debug && \
make -j"$JOBS"

RUN make install INSTALL_ROOT=/

FROM ubuntu:20.04

RUN apt-get update

RUN apt-get -y full-upgrade

RUN apt-get install -y --no-install-recommends \
libcairo2 libdouble-conversion3 libxml2 lib3mf1 libzip5 libharfbuzz0b \
libboost-thread1.67.0 libboost-program-options1.67.0 libboost-filesystem1.67.0 \
libboost-regex1.67.0 libglew2.1 libopencsg1 libmpfr6 libqscintilla2-qt5-15 \
libqt5multimedia5 libqt5concurrent5 libcgal-dev libglu1-mesa xvfb xauth \
libboost-filesystem1.71.0 libboost-regex1.71.0

RUN apt-get clean

WORKDIR /usr/local

COPY --from=builder /usr/local/ .

WORKDIR /openscad
81 changes: 81 additions & 0 deletions openscad/focal/Dockerfile.opengl
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu20.04 AS builder

ARG GITHUB_USER=openscad
ARG GITHUB_REPO=openscad
ARG BRANCH=master
ARG REFS=heads
ARG OPENSCAD_VERSION=
ARG SNAPSHOT=+
ARG DEBUG=-
ARG JOBS=1
ARG COMMIT=true

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get -y full-upgrade

# Base setup
RUN apt-get install -y --no-install-recommends \
apt-utils apt-transport-https ca-certificates git wget jq

# Dev dependencies
RUN apt-get -y install --no-install-recommends \
build-essential curl libffi-dev libxmu-dev cmake bison flex \
git-core libboost-all-dev libmpfr-dev libboost-dev libglew-dev \
libcairo2-dev libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev \
libgmp-dev imagemagick libfreetype6-dev libdouble-conversion-dev \
gtk-doc-tools libglib2.0-dev gettext pkg-config ragel libxi-dev \
libfontconfig-dev libzip-dev lib3mf-dev libharfbuzz-dev libxml2-dev \
qtbase5-dev libqt5scintilla2-dev libqt5opengl5-dev libqt5svg5-dev \
qtmultimedia5-dev libqt5multimedia5-plugins qt5-default

WORKDIR /openscad

# Invalidate docker cache if the branch changes
ADD https://api.github.com/repos/${GITHUB_USER}/${GITHUB_REPO}/git/refs/${REFS}/${BRANCH} version.json

RUN \
cat version.json | jq . && rm -f version.json && \
git clone "https://github.com/${GITHUB_USER}/${GITHUB_REPO}" . && \
git checkout "${BRANCH}" && \
git rev-parse --abbrev-ref HEAD && \
git log -n8 --pretty=tformat:"%h %ai (%aN) %s"

RUN \
git submodule update --init && \
export OPENSCAD_COMMIT=$(/bin/"$COMMIT" && git log -1 --pretty=format:%h || echo "") && \
qmake -v && \
qmake -d \
PREFIX=/usr/local \
VERSION="$OPENSCAD_VERSION" \
OPENSCAD_COMMIT="$OPENSCAD_COMMIT" \
CONFIG+=qopenglwidget \
CONFIG${SNAPSHOT}=experimental \
CONFIG${SNAPSHOT}=snapshot \
CONFIG${DEBUG}=debug && \
make -j"$JOBS"

RUN make install INSTALL_ROOT=/

FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu20.04

RUN apt-get update

RUN apt-get -y full-upgrade

RUN apt-get install -y --no-install-recommends \
libcairo2 libdouble-conversion3 libxml2 lib3mf1 libzip5 libharfbuzz0b \
libboost-thread1.67.0 libboost-program-options1.67.0 libboost-filesystem1.67.0 \
libboost-regex1.67.0 libglew2.1 libopencsg1 libmpfr6 libqscintilla2-qt5-15 \
libqt5multimedia5 libqt5concurrent5 libcgal-dev libglu1-mesa xvfb xauth \
libboost-filesystem1.71.0 libboost-regex1.71.0

RUN apt-get clean

WORKDIR /usr/local

COPY --from=builder /usr/local/ .

WORKDIR /openscad
11 changes: 7 additions & 4 deletions scripts/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ build () {
--build-arg=REFS="$REF" \
--build-arg=BRANCH="$BRANCH" \
--build-arg OPENSCAD_VERSION="$VERSION" \
--build-arg JOBS="1" \
$DOCKERFILE_ARGS \
"$DIR"
}

V=$(git log -1 --date="format:%Y.%m.%d.dd%j%H" --format="%cd")

#build tags openscad-2015.03 2015.03 "" openscad/buster
build tags openscad-2019.05 2019.05 "" openscad/buster
build tags openscad-2021.01 2021.01 "" openscad/buster
#build tags openscad-2015.03 2015.03 "" openscad/buster
build tags openscad-2019.05 2019.05 "" openscad/buster
build tags openscad-2021.01 2021.01 "" openscad/buster
build tags openscad-2021.01 2021.01-focal "" openscad/focal Dockerfile
build tags openscad-2021.01 2021.01-focal-opengl "" openscad/focal Dockerfile.opengl
build heads master dev "$V" openscad/bookworm

docker tag openscad/openscad:2021.01 openscad/openscad:latest
# docker tag openscad/openscad:2021.01 openscad/openscad:latest