--- /dev/null
+FROM debian:bullseye
+
+COPY ./requirements.txt /mnt/
+
+RUN apt update && \
+ DEBIAN_FRONTEND=noninteractive apt install -y build-essential postgresql libpq-dev libwrap0-dev python3 nano cython3 python3-pip openssh-client rsync libssl-dev && \
+ pip install pyinstaller && \
+ pip install -r /mnt/requirements.txt
+
+COPY ./docker-entrypoint.sh /
+
+RUN chmod +x /docker-entrypoint.sh
+
+WORKDIR /mnt/regress/
+
+
+ENTRYPOINT ["/docker-entrypoint.sh"]
+# To compile:
+ # Add Makefile rule:
+ # async:
+ # rsync -av -i ../bacula/src/ build/src/
+ # Change directory to: /mnt/regress/
+ # Execute:
+ # make async && -C build/src/plugins/fd install-kubernetes && make -C build/src/plugins/fd/kubernetes-backend clean && make -C build/src/plugins/fd/kubernetes-backend install-kubernetes
+ # Binary in: ~/regress/bin/k8s_backend
\ No newline at end of file
--- /dev/null
+# Target
+
+This docker image is to compile k8s plugin independent of ubuntu/debian platform. I had problems with libc library, so to isolate this problem, we create this docker image.
+
+If you want change this version, modify the image tag and dockerfile FROM.
+
+**Note:** The difference between Ubuntu and Debian in this compilation is that `rm` binary is allocated in other place:
+ - Ubuntu: `/usr/bin/rm`
+ - Debian: `/bin/rm`
+
+So, the Makefile will be modified to avoid errors.
+
+# Create the Docker image
+
+We need copy the requirements to docker context folder. For this reason, we do:
+```bash
+cp -a ../requirements.txt .
+```
+
+```bash
+docker build -t k8s_compilation:jammy .
+```
+
+# Pre-Run docker container
+
+To compile in docker container, we need modify the `regress config file` to adapt.
+
+Add BACULA_SOURCE:
+
+```bash
+# Where to get the source to be tested
+BACULA_SOURCE="/mnt/bacula/"
+```
+
+Discomment --disable-sd-dedup:
+```bash
+# DEDUP allows to disable deduplication on the SD
+# If you don't have TokyoCabinet
+DEDUP=--disable-sd-dedup
+#DEDUP=
+```
+
+
+Set postgresql database:
+```bash
+# Set your database here
+#WHICHDB="--with-sqlite3=${SQLITE3_DIR}"
+WHICHDB="--with-postgresql"
+#WHICHDB="--with-mysql"
+```
+
+We need compile with this config because unless we can't compile k8s.
+
+
+Also we need modify the `regress/Makefile` and add the next rule at the end of file:
+
+```
+async:
+ rsync -av -i ../bacula/src/ build/src/
+```
+
+# Run docker container
+In root project (bacula-bee folder), execute:
+
+```bash
+docker run --rm -it -v $(pwd):/mnt k8s_compilation:jammy /bin/bash
+```
+
+# Compile k8s plugin
+
+Execute:
+```bash
+make async
+```
+
+```bash
+make -C build/src/plugins/fd install-kubernetes
+```
+
+```bash
+make -C build/src/plugins/fd/kubernetes-backend clean
+```
+
+```bash
+make -C build/src/plugins/fd/kubernetes-backend install-kubernetes
+```
+
+Or in one command:
+```bash
+make async; make -C build/src/plugins/fd install-kubernetes; make -C build/src/plugins/fd/kubernetes-backend clean; make -C build/src/plugins/fd/kubernetes-backend install-kubernetes
+```
+
+# Get the k8s_backend binary
+
+Will be in `~/regress/bin/k8s_backend`.
+
+The last action to do in this file is change the permissions or owner.
\ No newline at end of file
--- /dev/null
+# -*- coding: UTF-8 -*-
+#
+# Bacula® - The Network Backup Solution
+#
+# Copyright (C) 2000-2019 Bacula Systems SA
+# All rights reserved.
+#
+# The main author of Bacula is Kern Sibbald, with contributions from many
+# others, a complete list can be found in the file AUTHORS.
+#
+# Licensees holding a valid Bacula Systems SA license may use this file
+# and others of this release in accordance with the proprietary license
+# agreement provided in the LICENSE file. Redistribution of any part of
+# this release is not permitted.
+#
+# Bacula® is a registered trademark of Kern Sibbald.
+#
+# Copyright (c) 2019 by Inteos sp. z o.o.
+# All rights reserved. IP transfered to Bacula Systems according to agreement.
+# Author: Radosław Korzeniewski, radekk@inteos.pl, Inteos Sp. z o.o.
+#
+
+pyyaml == 6.0
+kubernetes <= 26.1.0
+urllib3 == 1.26.16
+requests == 2.27.1