Skip to content

Commit

Permalink
Fix bundle bug, upgrade to Bookworm
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Feb 4, 2024
1 parent 69e3b53 commit 2e12adb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim AS sqitch-build
FROM debian:bookworm-slim AS sqitch-build

# Install system dependencies.
WORKDIR /work
Expand All @@ -25,23 +25,24 @@ RUN perl Build.PL --quiet --install_base /app --etcdir /etc/sqitch \
--config installman1dir= --config installsiteman1dir= --config installman3dir= --config installsiteman3dir= \
--with sqlite --with postgres --with firebird --with odbc \
&& ln -s /usr/include/ibase.h /usr/include/firebird/ \
&& perl -i -pe 's/(use Data::Dump.+)//' inc/Menlo/Sqitch.pm \
# XXX Fix for removal of BEGIN block in v1.4.1.
&& perl -i -pe 's/BEGIN/use App::Sqitch/g' inc/Module/Build/Sqitch.pm \
&& ./Build bundle \
&& rm -rf /app/man \
&& find /app -name '*.pod' | grep -v sqitch | xargs rm -rf

################################################################################
# Copy to the final image without all the build stuff.
FROM debian:bullseye-slim AS sqitch
FROM debian:bookworm-slim AS sqitch

# Install runtime system dependencies and remove unnecesary files.
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
&& apt-get -qq update \
&& apt-get -qq --no-install-recommends install less libperl5.32 perl-doc nano ca-certificates \
&& apt-get -qq --no-install-recommends install less libperl5.36 perl-doc nano ca-certificates \
sqlite3 \
firebird3.0-utils libfbclient2 \
libpq5 postgresql-client \
mariadb-client-core-10.5 libmariadb-dev-compat libdbd-mysql-perl \
mariadb-client-core libmariadb-dev-compat libdbd-mysql-perl \
&& apt-cache pkgnames | grep python | xargs apt-get purge -qq \
&& apt-cache pkgnames | grep libmagic | xargs apt-get purge -qq \
&& apt-get clean \
Expand All @@ -58,7 +59,8 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \
&& chown -R sqitch:sqitch /home

# Copy the app and config from the build image.
COPY --from=sqitch-build /app .
COPY --from=sqitch-build /app/lib /lib
COPY --from=sqitch-build /app/bin /bin
COPY --from=sqitch-build /etc/sqitch /etc/sqitch/

# Set up environment, entrypoint, and default command.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Description
-----------

This project is the source for creating the official [Sqitch Project] Docker
Image. It's built on [Debian bullseye-slim] in an effort to keep the image as
Image. It's built on [Debian bookworm-slim] in an effort to keep the image as
small as possible while supporting all known engines. It includes support for
managing [PostgreSQL], [CockroachDB], [YugabyteDB], [SQLite], [MariaDB]
([MySQL]), and [Firebird] databases, and other images may be built to support
Expand Down Expand Up @@ -80,7 +80,7 @@ Notes
one based on this image and add whatever editors you like.

[Sqitch Project]: https://sqitch.org
[Debian bullseye-slim]: https://hub.docker.com/_/debian/tags?name=bullseye-slim
[Debian bookworm-slim]: https://hub.docker.com/_/debian/tags?name=bookworm-slim
[PostgreSQL]: https://postgresql.org
[YugabyteDB]: https://www.yugabyte.com/yugabytedb/
[CockroachDB]: https://www.cockroachlabs.com/product/
Expand Down
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fi
# Build and export imaages to Docker for all supported architectures.
for arch in $ARCHS; do
printf "Building for linux/%s\n" "${arch}"
docker buildx build --platform="linux/${arch}" --pull --load \
docker buildx build --platform="linux/${arch}" --pull --load --progress=plain \
--label org.opencontainers.image.created=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.opencontainers.image.authors="${AUTHORS}" \
--label org.opencontainers.image.url="${URL}" \
Expand Down
2 changes: 1 addition & 1 deletion exasol/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 debian:bullseye-slim AS exa-build
FROM --platform=linux/amd64 debian:bookworm-slim AS exa-build

WORKDIR /work

Expand Down
2 changes: 1 addition & 1 deletion oracle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim AS ora-build
FROM debian:bookworm-slim AS ora-build

WORKDIR /work

Expand Down
2 changes: 1 addition & 1 deletion snowflake/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim AS snow-build
FROM debian:bookworm-slim AS snow-build

WORKDIR /work

Expand Down

0 comments on commit 2e12adb

Please sign in to comment.