Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Docker image for kubernetes helm chart #378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions docker/kubernetes/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM python:3.13-slim AS builder

ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive

#======================================================
# Builder - Create virtualenv for Pulsar
#======================================================
RUN apt-get update \
&& apt-get install -y --no-install-recommends apt-transport-https \
# Install packages
&& apt-get update \
&& apt-get install -y --no-install-recommends gcc \
libcurl4-openssl-dev \
bzip2 virtualenv \
&& mkdir /pulsar

WORKDIR /pulsar

COPY pulsar_app-*-py2.py3-none-any.whl .
COPY requirements.txt .

# Install Pulsar Python requirements
RUN virtualenv .venv \
&& . .venv/bin/activate \
&& pip install wheel pykube-ng \
&& pip install -r requirements.txt Paste \
&& pip install `ls pulsar_app-*-py2.py3-none-any.whl`\[galaxy_extended_metadata,web,amqp\]

# generate default pulsar config
RUN .venv/bin/pulsar-config --host 0.0.0.0

#======================================================
# Final image - Copy virtualenv for Pulsar
#======================================================
FROM python:3.13-slim

ENV PYTHONUNBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
ENV PULSAR_CONFIG_PRIVATE_TOKEN=change_me

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
bzip2 virtualenv \
&& adduser --disabled-password --gecos '' pulsar \
&& mkdir /pulsar \
&& chown pulsar:pulsar /pulsar

WORKDIR /pulsar
COPY --chown=pulsar:pulsar --from=builder /pulsar .

USER pulsar

EXPOSE 8913

CMD [".venv/bin/pulsar"]
9 changes: 9 additions & 0 deletions docker/kubernetes/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


dist:
cd ../..; make dist; cp dist/pulsar*whl docker/kubernetes; cp requirements.txt docker/kubernetes

docker-image:
docker build -t 'galaxy/pulsar-kubernetes:0.15.7' .

all: dist docker-image
Loading