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

[Feature] Runtime docker image #9426

Open
2 of 3 tasks
pan3793 opened this issue May 7, 2022 · 4 comments
Open
2 of 3 tasks

[Feature] Runtime docker image #9426

pan3793 opened this issue May 7, 2022 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@pan3793
Copy link
Member

pan3793 commented May 7, 2022

Search before asking

  • I had searched in the issues and found no similar issues.

Description

I'm asking for a runtime Doris image, mostly for testing purpose.

Before requesting, I found a https://hub.docker.com/r/apachedoris/doris-dev by searching on Docker Hub, it's for dev not runtime.

Use case

Mostly for testing purpose.

For example, the doris-spark-connector requires user setup doris locally before running test, it's not friendly, and can not be verified by CI.

https://github.com/apache/incubator-doris-spark-connector/blob/094d76f84d2761ff18dfbbe5118539ba5f5cd142/spark-doris-connector/src/test/scala/org/apache/doris/spark/sql/TestSparkConnector.scala#L25-L35

This is a integration testing demo of Spark ClickHouse connector, which leverage Testcontainers to run test with ClickHouse single node and cluster w/o user pre-setup ClickHouse but only have Docker and Docker Compose installed.

https://github.com/housepower/spark-clickhouse-connector/tree/master/clickhouse-core/src/testFixtures/scala/xenon/clickhouse/base

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@pan3793 pan3793 added the kind/feature Categorizes issue or PR as related to a new feature. label May 7, 2022
@myfjdthink
Copy link
Contributor

After I tried, doris is running successfully in docker-compose, https://github.com/myfjdthink/doris-docker-compose hope it helps you

@linghengqian
Copy link
Member

@qomosoloto
Copy link

Any updation about this?

@linghengqian
Copy link
Member

linghengqian commented May 18, 2024

FROM openjdk:8u342-jdk

ENV JAVA_HOME="/usr/local/openjdk-8/"
ENV PATH="/opt/apache-doris/fe/bin:$PATH"

apt-get install -y wget
wget https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-2.1.2-bin-x64.tar.gz -O /opt/apache-doris-bin.tar.gz

RUN apt-get update && \
    apt-get install -y default-mysql-client && \
    apt-get clean && \
    mkdir /opt/apache-doris && \
    cd /opt && \
    mv apache-doris-bin/fe /opt/apache-doris/

wget https://raw.githubusercontent.com/apache/doris/2.1.2-rc04/docker/runtime/fe/resource/init_fe.sh -O /opt/apache-doris/fe/bin/init_fe.sh

RUN chmod 755 /opt/apache-doris/fe/bin/init_fe.sh

ENTRYPOINT ["/opt/apache-doris/fe/bin/init_fe.sh"]
  • For BE, it looks like this. (not verified)
FROM openjdk:8u342-jdk

ENV JAVA_HOME="/usr/local/openjdk-8/" 
ENV PATH="/opt/apache-doris/be/bin:$PATH"

apt-get install -y wget
wget https://apache-doris-releases.oss-accelerate.aliyuncs.com/apache-doris-2.1.2-bin-x64.tar.gz -O /opt/apache-doris-bin.tar.gz

RUN apt-get update && \
    apt-get install -y default-mysql-client && \
    apt-get clean && \
    mkdir /opt/apache-doris && \
    cd /opt && \
    mv apache-doris-bin/be /opt/apache-doris/

wget https://github.com/apache/doris/blob/2.1.2-rc04/docker/runtime/be/resource/init_be.sh -O /opt/apache-doris/be/bin/init_be.sh

RUN chmod 755 /opt/apache-doris/be/bin/init_be.sh

ENTRYPOINT ["/opt/apache-doris/be/bin/init_be.sh"]
  • If there are no Runtime-level Docker Images available on Docker Hub or ghcr.io, integrating Doris for testing in other projects without pre-building the Docker Images would necessitate multiple downloads of binary files akin to apache-doris-2.0.3-bin.tar.gz under testcontainers-java's Java API using ImageFromDockerfile, thereby increasing the overhead during the test setup process. It's hard to say this is an intuitive way to go about it.

  • Update: Of course the docker image for jdk8 here is from the Doris documentation, the arm64 variant port never existed on openjdk8, and openjdk support for arm64 is only available on jdk11+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants