Skip to content

Commit

Permalink
feat(dockerfiles): move images from bullseye to bookworm (#2545)
Browse files Browse the repository at this point in the history
* feat(dockerfiles): move images from bullseye to bookworm

* fix(dockerfiles): remove deprecated python package
  • Loading branch information
fmauNeko authored Aug 8, 2024
1 parent ffed901 commit c225aa1
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 61 deletions.
40 changes: 20 additions & 20 deletions docker/images/core-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG NODE_VERSION="20"
FROM node:${NODE_VERSION}-bullseye-slim
FROM node:${NODE_VERSION}-bookworm-slim

LABEL io.kuzzle.vendor="Kuzzle <support@kuzzle.io>"
LABEL description="Enhance the Kuzzle core with ease"
Expand All @@ -11,22 +11,22 @@ ENV NPM_CONFIG_CACHE=/var/npm
WORKDIR /var/app

RUN set -x \
\
&& apt-get update \
&& apt-get install -y \
bash-completion \
build-essential \
curl \
g++ \
gdb \
git \
gnupg \
libfontconfig \
libzmq3-dev \
python3 \
procps \
wget \
libunwind-dev \
&& npm install -g kourou \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
\
&& apt-get update \
&& apt-get install -y \
bash-completion \
build-essential \
curl \
g++ \
gdb \
git \
gnupg \
libfontconfig \
libzmq3-dev \
python3 \
procps \
wget \
libunwind-dev \
&& npm install -g kourou \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
22 changes: 11 additions & 11 deletions docker/images/kuzzle-runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG NODE_VERSION="20"
FROM node:${NODE_VERSION}-bullseye-slim
FROM node:${NODE_VERSION}-bookworm-slim

LABEL io.kuzzle.vendor="Kuzzle <support@kuzzle.io>"
LABEL description="Run your in-development Kuzzle application with ease"
Expand All @@ -11,15 +11,15 @@ ENV NPM_CONFIG_CACHE=/var/npm
WORKDIR /var/app

RUN set -x \
&& apt-get update && apt-get install -y \
curl \
python3 \
make \
g++ \
git \
libzmq3-dev \
libunwind-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& apt-get update && apt-get install -y \
curl \
python3 \
make \
g++ \
git \
libzmq3-dev \
libunwind-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN npm i -g kourou
35 changes: 17 additions & 18 deletions docker/images/kuzzle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
################################################################################
ARG NODE_VERSION="20"
FROM node:${NODE_VERSION}-bullseye-slim AS builder
FROM node:${NODE_VERSION}-bookworm-slim AS builder

RUN set -x \
&& apt-get update \
&& apt-get install -y \
curl \
python \
make \
g++ \
python3 \
libzmq3-dev \
libunwind-dev
&& apt-get update \
&& apt-get install -y \
curl \
make \
g++ \
python3 \
libzmq3-dev \
libunwind-dev

WORKDIR /app

Expand All @@ -32,27 +31,27 @@ RUN rm -rf tsconfig.json index.ts
ADD ./plugins/available/ /app/plugins/available/

################################################################################
FROM node:${NODE_VERSION}-bullseye-slim AS minifier
FROM node:${NODE_VERSION}-bookworm-slim AS minifier

ENV NODE_ENV=production

COPY --from=builder /app /app

RUN set -x \
&& apt-get update && apt-get install -y \
curl \
&& apt-get clean autoclean \
&& apt-get autoremove --yes
&& apt-get update && apt-get install -y \
curl \
&& apt-get clean autoclean \
&& apt-get autoremove --yes

################################################################################
FROM node:${NODE_VERSION}-bullseye-slim
FROM node:${NODE_VERSION}-bookworm-slim

LABEL io.kuzzle.vendor="Kuzzle <support@kuzzle.io>"
LABEL description="Run your Kuzzle backend in production mode"

RUN set -x \
&& apt-get update && apt-get install -y \
libunwind-dev
&& apt-get update && apt-get install -y \
libunwind-dev

COPY --from=minifier /lib /lib
COPY --from=minifier /usr /usr
Expand Down
6 changes: 3 additions & 3 deletions docker/images/kuzzle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

This image is meant to be used in production environment.

This image is based on `node:20-bullseye-slim` and it contains Kuzzle code and dependencies.
This image is based on `node:20-bookworm-slim` and it contains Kuzzle code and dependencies.

## Usage

You should use this image as a base build your own application:

```dockerfile
# Build image
FROM node:20-bullseye-slim as builder
FROM node:20-bookworm-slim as builder

ADD . /your-plugin-name

Expand All @@ -24,4 +24,4 @@ FROM kuzzleio/kuzzle:2
COPY --from=builder /your-plugin-name /var/app/plugins/enabled/your-plugin-name
```

Then run `docker build -t your-plugin-name .`
Then run `docker build -t your-plugin-name .`
18 changes: 9 additions & 9 deletions docker/images/plugin-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
################################################################################
ARG NODE_VERSION="20"
FROM node:${NODE_VERSION}-bullseye-slim AS builder
FROM node:${NODE_VERSION}-bookworm-slim AS builder

RUN set -x \
&& apt-get update && apt-get install -y \
curl \
make \
g++ \
python3 \
libzmq3-dev \
libunwind-dev
curl \
make \
g++ \
python3 \
libzmq3-dev \
libunwind-dev

WORKDIR /app

Expand All @@ -30,7 +30,7 @@ RUN rm -rf tsconfig.json index.ts
ADD ./plugins/available/ plugins/available/

################################################################################
FROM node:${NODE_VERSION}-bullseye-slim
FROM node:${NODE_VERSION}-bookworm-slim

LABEL io.kuzzle.vendor="Kuzzle <support@kuzzle.io>"
LABEL description="Develop new plugin or protocol for Kuzzle with ease"
Expand All @@ -39,7 +39,7 @@ WORKDIR /var/app

RUN set -x \
&& apt-get update && apt-get install -y \
libunwind-dev
libunwind-dev

ADD ./docker/scripts/entrypoint.sh /bin/entrypoint
ADD ./docker/scripts/run-plugin.sh /bin/run-plugin
Expand Down

0 comments on commit c225aa1

Please sign in to comment.