-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker image for kubernetes helm chart
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |