mirror of
https://github.com/octoleo/plantuml-server.git
synced 2025-01-02 20:50:15 +00:00
docker: use always latest Graphviz release
This will change the Graphviz behaviour inside the docker container. Until now it was always a fixed Graphviz version inside the Dockerfile. With these changes the docker container will always use the latest Graphviz release if the version was not manually set via the docker build argument `GRAPHVIZ_VERSION`. If not set as build arg fetch latest version of Graphviz based on their release name by default. An alternative would be to use `tag_name`. Also, to avoid the overhead of getting all kinds of relase data, GitLabs GraphQL interface could be used. ```bash curl -s \ -H "Content-Type:application/json" \ -d '{"query": "{project(fullPath:\"graphviz/graphviz\"){releases(first:5,sort:RELEASED_AT_DESC){nodes{name}}}}"}' \ "https://gitlab.com/api/graphql" \ | jq -r '.data.project.releases.nodes[].name' | sort -V -r | head -n 1 ``` In GraphQL the alternative to `name` would be `tagName`.
This commit is contained in:
parent
f0d78a146b
commit
a6e69b33eb
@ -17,3 +17,6 @@ trim_trailing_whitespace = false
|
|||||||
|
|
||||||
[*.puml]
|
[*.puml]
|
||||||
insert_final_newline = false
|
insert_final_newline = false
|
||||||
|
|
||||||
|
[{Dockerfile,Dockerfile.*}]
|
||||||
|
indent_size = 4
|
||||||
|
@ -27,17 +27,19 @@ RUN apt-get update && \
|
|||||||
/generate-jetty-start.sh
|
/generate-jetty-start.sh
|
||||||
|
|
||||||
# Build Graphviz from source because there are no binary distributions for recent versions
|
# Build Graphviz from source because there are no binary distributions for recent versions
|
||||||
ARG GRAPHVIZ_VERSION=8.0.2
|
ARG GRAPHVIZ_VERSION
|
||||||
ARG GRAPHVIZ_BUILD_DIR=/tmp/graphiz-build
|
ARG GRAPHVIZ_BUILD_DIR=/tmp/graphiz-build
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
jq \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libgd-dev \
|
libgd-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
&& \
|
&& \
|
||||||
mkdir -p $GRAPHVIZ_BUILD_DIR && \
|
mkdir -p $GRAPHVIZ_BUILD_DIR && \
|
||||||
cd $GRAPHVIZ_BUILD_DIR && \
|
cd $GRAPHVIZ_BUILD_DIR && \
|
||||||
|
GRAPHVIZ_VERSION=${GRAPHVIZ_VERSION:-$(curl -s https://gitlab.com/api/v4/projects/4207231/releases/ | jq -r '.[] | .name' | sort -V -r | head -1)} && \
|
||||||
curl -o graphviz.tar.gz https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.gz && \
|
curl -o graphviz.tar.gz https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.gz && \
|
||||||
tar -xzf graphviz.tar.gz && \
|
tar -xzf graphviz.tar.gz && \
|
||||||
cd graphviz-$GRAPHVIZ_VERSION && \
|
cd graphviz-$GRAPHVIZ_VERSION && \
|
||||||
@ -46,6 +48,7 @@ RUN apt-get update && \
|
|||||||
make install && \
|
make install && \
|
||||||
apt-get remove -y \
|
apt-get remove -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
jq \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libgd-dev \
|
libgd-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
|
@ -25,16 +25,18 @@ RUN apk add --no-cache \
|
|||||||
/generate-jetty-start.sh
|
/generate-jetty-start.sh
|
||||||
|
|
||||||
#RUN apk add --no-cache graphviz
|
#RUN apk add --no-cache graphviz
|
||||||
ARG GRAPHVIZ_VERSION=8.0.2
|
ARG GRAPHVIZ_VERSION
|
||||||
ARG GRAPHVIZ_BUILD_DIR=/tmp/graphiz-build
|
ARG GRAPHVIZ_BUILD_DIR=/tmp/graphiz-build
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
g++ \
|
g++ \
|
||||||
|
jq \
|
||||||
libexpat \
|
libexpat \
|
||||||
make \
|
make \
|
||||||
zlib \
|
zlib \
|
||||||
&& \
|
&& \
|
||||||
mkdir -p $GRAPHVIZ_BUILD_DIR && \
|
mkdir -p $GRAPHVIZ_BUILD_DIR && \
|
||||||
cd $GRAPHVIZ_BUILD_DIR && \
|
cd $GRAPHVIZ_BUILD_DIR && \
|
||||||
|
GRAPHVIZ_VERSION=${GRAPHVIZ_VERSION:-$(curl -s https://gitlab.com/api/v4/projects/4207231/releases/ | jq -r '.[] | .name' | sort -V -r | head -1)} && \
|
||||||
curl -o graphviz.tar.gz https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.gz && \
|
curl -o graphviz.tar.gz https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.gz && \
|
||||||
tar -xzf graphviz.tar.gz && \
|
tar -xzf graphviz.tar.gz && \
|
||||||
cd graphviz-$GRAPHVIZ_VERSION && \
|
cd graphviz-$GRAPHVIZ_VERSION && \
|
||||||
@ -43,6 +45,7 @@ RUN apk add --no-cache \
|
|||||||
make install && \
|
make install && \
|
||||||
apk del --no-cache \
|
apk del --no-cache \
|
||||||
g++ \
|
g++ \
|
||||||
|
jq \
|
||||||
libexpat \
|
libexpat \
|
||||||
make \
|
make \
|
||||||
zlib \
|
zlib \
|
||||||
|
@ -19,17 +19,19 @@ RUN apt-get update && \
|
|||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Build Graphviz from source because there are no binary distributions for recent versions
|
# Build Graphviz from source because there are no binary distributions for recent versions
|
||||||
ARG GRAPHVIZ_VERSION=8.0.2
|
ARG GRAPHVIZ_VERSION
|
||||||
ARG GRAPHVIZ_BUILD_DIR=/tmp/graphiz-build
|
ARG GRAPHVIZ_BUILD_DIR=/tmp/graphiz-build
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
jq \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libgd-dev \
|
libgd-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
&& \
|
&& \
|
||||||
mkdir -p $GRAPHVIZ_BUILD_DIR && \
|
mkdir -p $GRAPHVIZ_BUILD_DIR && \
|
||||||
cd $GRAPHVIZ_BUILD_DIR && \
|
cd $GRAPHVIZ_BUILD_DIR && \
|
||||||
|
GRAPHVIZ_VERSION=${GRAPHVIZ_VERSION:-$(curl -s https://gitlab.com/api/v4/projects/4207231/releases/ | jq -r '.[] | .name' | sort -V -r | head -1)} && \
|
||||||
curl -o graphviz.tar.gz https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.gz && \
|
curl -o graphviz.tar.gz https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.gz && \
|
||||||
tar -xzf graphviz.tar.gz && \
|
tar -xzf graphviz.tar.gz && \
|
||||||
cd graphviz-$GRAPHVIZ_VERSION && \
|
cd graphviz-$GRAPHVIZ_VERSION && \
|
||||||
@ -38,6 +40,7 @@ RUN apt-get update && \
|
|||||||
make install && \
|
make install && \
|
||||||
apt-get remove -y \
|
apt-get remove -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
jq \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libgd-dev \
|
libgd-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
|
Loading…
Reference in New Issue
Block a user