diff --git a/docker/build.sh b/docker/build.sh index c642d40b439dab..d8ab4bea882c42 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -21,5 +21,4 @@ ROOT_DIR=$(git rev-parse --show-toplevel) cd $ROOT_DIR/docker -mvn -f ../dashboard/pom.xml package -Pdocker,-main mvn package -Pdocker,-main diff --git a/docker/pom.xml b/docker/pom.xml index 573c188902f504..1d106d77247e2d 100644 --- a/docker/pom.xml +++ b/docker/pom.xml @@ -60,7 +60,6 @@ pulsar grafana pulsar-all - pulsar-standalone diff --git a/docker/publish.sh b/docker/publish.sh index c064286b22bcfb..1df2dd7bebabe0 100755 --- a/docker/publish.sh +++ b/docker/publish.sh @@ -65,21 +65,17 @@ set -e docker tag pulsar:latest ${docker_registry_org}/pulsar:latest docker tag pulsar-all:latest ${docker_registry_org}/pulsar-all:latest docker tag pulsar-grafana:latest ${docker_registry_org}/pulsar-grafana:latest -docker tag pulsar-standalone:latest ${docker_registry_org}/pulsar-standalone:latest docker tag pulsar:latest ${docker_registry_org}/pulsar:$MVN_VERSION docker tag pulsar-all:latest ${docker_registry_org}/pulsar-all:$MVN_VERSION docker tag pulsar-grafana:latest ${docker_registry_org}/pulsar-grafana:$MVN_VERSION -docker tag pulsar-standalone:latest ${docker_registry_org}/pulsar-standalone:$MVN_VERSION # Push all images and tags docker push ${docker_registry_org}/pulsar:latest docker push ${docker_registry_org}/pulsar-all:latest docker push ${docker_registry_org}/pulsar-grafana:latest -docker push ${docker_registry_org}/pulsar-standalone:latest docker push ${docker_registry_org}/pulsar:$MVN_VERSION docker push ${docker_registry_org}/pulsar-all:$MVN_VERSION docker push ${docker_registry_org}/pulsar-grafana:$MVN_VERSION -docker push ${docker_registry_org}/pulsar-standalone:$MVN_VERSION echo "Finished pushing images to ${docker_registry_org}" diff --git a/docker/pulsar-standalone/Dockerfile b/docker/pulsar-standalone/Dockerfile deleted file mode 100644 index cabbb7d128790c..00000000000000 --- a/docker/pulsar-standalone/Dockerfile +++ /dev/null @@ -1,94 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Using files from pulsar-all docker image for pulsar -FROM apachepulsar/pulsar-all:latest as pulsar - -# Using files from pulsar-dashboard for the dashboard -FROM apachepulsar/pulsar-dashboard:latest as dashboard - -# Restart from -FROM ubuntu:20.04 - -ARG DEBIAN_FRONTEND=noninteractive - -# Note that the libpq-dev package is needed here in order to install -# the required python psycopg2 package (for postgresql) later -RUN apt-get update \ - && apt-get -y install openjdk-11-jdk-headless python3 python3-dev python3-pip postgresql sudo nginx supervisor libpq-dev - -RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10 -RUN update-ca-certificates - -# Postgres configuration -COPY --from=dashboard /etc/postgresql/11/main/postgresql.conf /etc/postgresql/12/main/postgresql.conf - -# Configure supervisor -COPY --from=dashboard /etc/supervisor/conf.d/supervisor-app.conf /etc/supervisor/conf.d/supervisor-app.conf - -# Add pulsar to supervisord. Redirect logs to stdout -RUN echo "[program:pulsar]\n\ -command = /pulsar/bin/pulsar standalone\n\ -stdout_logfile=/dev/fd/1\n\ -stdout_logfile_maxbytes=0\n\ -redirect_stderr=true" >> /etc/supervisor/conf.d/supervisor-app.conf - -# Configure nginx -RUN echo "daemon off;" >> /etc/nginx/nginx.conf -COPY --from=dashboard /etc/nginx/sites-available/default /etc/nginx/sites-available/default - -# Copy pulsar files from pulsar-all -COPY --from=pulsar /pulsar /pulsar - -# Copy web-app sources -COPY . /pulsar/ - -# Copy dashboard files from pulsar-dashboard -COPY --from=dashboard /pulsar/django /pulsar/django -COPY --from=dashboard /pulsar/requirements.txt /pulsar/django -COPY --from=dashboard /pulsar/conf/* /pulsar/conf/ - -RUN pip -V - -# Python dependencies -RUN pip install -r /pulsar/django/requirements.txt - -# Copy web-app sources -# Setup database and create tables -COPY --from=dashboard /pulsar/init-postgres.sh /pulsar/django/init-postgres.sh -RUN mkdir /data -RUN /pulsar/django/init-postgres.sh -RUN sudo -u postgres /etc/init.d/postgresql stop -# Add postgresql to supervisord. Redirect logs to stdout -RUN echo "\n[program:postgresql]\n\ -command = /etc/init.d/postgresql start\n\ -stdout_logfile=/dev/fd/1\n\ -stdout_logfile_maxbytes=0\n\ -redirect_stderr=true" >> /etc/supervisor/conf.d/supervisor-app.conf - -# Collect all static files needed by Django in a -# single place. Needed to run the app outside the -# Django test web server -RUN cd /pulsar/django && python manage.py collectstatic --no-input - -ENV SERVICE_URL http://127.0.0.1:8080 -EXPOSE 80 8080 6650 - -CMD ["supervisord", "-n"] - diff --git a/docker/pulsar-standalone/pom.xml b/docker/pulsar-standalone/pom.xml deleted file mode 100644 index 8f5bfda791a747..00000000000000 --- a/docker/pulsar-standalone/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - org.apache.pulsar - docker-images - 2.9.0-SNAPSHOT - - 4.0.0 - pulsar-standalone-docker-image - Apache Pulsar :: Docker Images :: Pulsar Standalone - pom - - - - docker - - - - ${project.groupId} - pulsar-all-docker-image - ${project.version} - docker-info - - - - - - com.spotify - dockerfile-maven-plugin - ${dockerfile-maven.version} - - - default - - build - - - - add-no-repo-and-version - - tag - - - pulsar-standalone - ${project.version} - - - - add-no-repo-and-latest - - tag - - - pulsar-standalone - latest - - - - tag-and-push-latest - - tag - push - - - ${docker.organization}/pulsar-standalone - latest - - - - - ${docker.organization}/pulsar-standalone - false - ${project.version} - - - - - - -