Skip to content

Commit

Permalink
Use DejaVu Serif in all containers (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhoefler committed Nov 23, 2023
1 parent ab17c6a commit 76e0ac8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 13 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ FROM ubuntu:jammy-20231004@sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac

LABEL org.opencontainers.image.source="https://github.com/patrickhoefler/dockerfilegraph"

# renovate: datasource=repology depName=ubuntu_22_04/fonts-dejavu versioning=loose
ENV FONTS_DEJAVU_VERSION="2.37-2build1"

# renovate: datasource=repology depName=ubuntu_22_04/graphviz versioning=loose
ENV GRAPHVIZ_VERSION="2.42.2-6"

RUN \
# Note that the lack of a "lock" mechanism for apt dependencies
# currently prevents a fully reproducible build
apt-get update \
&& apt-get install -y --no-install-recommends \
# Install Graphviz
graphviz \
fonts-dejavu="${FONTS_DEJAVU_VERSION}" \
graphviz="${GRAPHVIZ_VERSION}" \
&& rm -rf /var/lib/apt/lists/* \
\
# Add a non-root user
Expand All @@ -18,8 +22,8 @@ RUN \
# Run as non-root user
USER app

# This currently only works with goreleaser
# or if you manually copy the binary into the main project directory
# This only works after running `make build-linux`
# or when using goreleaser
COPY dockerfilegraph /

ENTRYPOINT ["/dockerfilegraph"]
14 changes: 10 additions & 4 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ FROM alpine:3.18.4@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c0162

LABEL org.opencontainers.image.source="https://github.com/patrickhoefler/dockerfilegraph"

# renovate: datasource=repology depName=alpine_3_18/font-dejavu versioning=loose
ENV FONT_DEJAVU_VERSION="2.37-r5"

# renovate: datasource=repology depName=alpine_3_18/graphviz versioning=loose
ENV GRAPHVIZ_VERSION="8.0.5-r1"

RUN apk add --update --no-cache \
graphviz \
ttf-freefont \
font-dejavu="${FONT_DEJAVU_VERSION}" \
graphviz="${GRAPHVIZ_VERSION}" \
\
# Add a non-root user
&& adduser -D app

# Run as non-root user
USER app

# This currently only works with goreleaser
# or if you manually copy the binary into the main project directory
# This only works after running `make build-linux`
# or when using goreleaser
COPY dockerfilegraph /

ENTRYPOINT ["/dockerfilegraph"]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ FLAGS = -ldflags "$(LDFLAGS)"
build:
go build $(FLAGS)

build-linux-amd64:
GOOS=linux GOARCH=amd64 go build $(FLAGS)
build-linux:
GOOS=linux go build $(FLAGS)

example-images:
# Change to the root directory of the project.
Expand Down
16 changes: 15 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,22 @@
"helpers:pinGitHubActionDigests"
],
"automerge": true,
"customManagers": [
{
"customType": "regex",
"fileMatch": [
"^Dockerfile$"
],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sENV .*?_VERSION=\"(?<currentValue>.*)\"\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}
],
"dependencyDashboard": false,
"ignorePaths": ["**/examples/**"],
"ignorePaths": [
"**/examples/**"
],
"major": {
"automerge": false
},
Expand Down

0 comments on commit 76e0ac8

Please sign in to comment.