apache / apache/hugegraph

[Feature] Support build docker image from Dockerfile (Task Summary)

Open
#840 18 comments 1 reaction 1 assignee Claimed by @aroundabout View on GitHub
ci-cd feature help wanted rocksdb
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

> Apache [HugeGraph](https://hub.docker.com/r/hugegraph/hugegraph) DockerHub: https://hub.docker.com/r/hugegraph/hugegraph

## Usage:
```bash
# 0. download image (latest)
docker pull hugegraph/hugegraph

# 1. start container
docker run -itd hugegraph/hugegraph # start server in daemon mode

# (Optional configs to expose network port outside)
docker run -itd --name=graph -p 18080:8080 hugegraph/hugegraph

# 2. (Optional) enter the container & start hugegraph-hubble
docker exec -it graph bash
xxx
```

## Feature Needs
1. Add Dockerfile for running HugeServer
2. Users can pull/run the image from dockerhub directly.

And anyone who has other suggestion for docker image can comment here

_After PR, will update the doc_ 📝

## Update in 2023.11.09:

Due to the project will move to Apache Foundation, we'll use `1.0.0` as the server version & bind hubble with it, reopen this issue until it meets the new need, any suggestions for `Dockerfile` are welcome.

- [ ] Dockerfile start cmd & restart problem #2343
- [ ] use [docker-slim](https://github.com/docker-slim/docker-slim) to slim the image
- [ ] use docker-compose to manage computer, it needs to contain `etcd` and `hugegraph-server`
- [ ] use DockerHub(autobuild), currently it's not free to use (Submit a OSS request)
- [x] fix that hubble can't use `localhost/0.0.0.0` & add a script to update the image
- [x] use a script to run server & hubble together OR use docker-compose to manage them
- [x] support Cassandra(Docker) as backend (compose with HugeGraph) #2307
- [x] keep the tags same with server (like `hugegraph/hugegraph:1.0.0`) https://github.com/hugegraph/actions/pull/1
- [x] pre-load some data or graphs in container so that users can traverse the graph with one step #2241
- [x] use hubble instead of studio to support new features
- [x] support `ARM` env (for M1 laptop, refer [doc](https://github.com/marketplace/actions/docker-setup-buildx))
- [x] consider better way (like add a option/program to run backward) to avoid modify start-script #2118
- [x] adopt v0.12 (support raft based replication)
- [x] use github actions to publish images
- [x] use jdk11 for runtime #2118
- [x] use `multi-stage` Dockerfile way to slim the image
- [x] support build from the (latest) source code #2118

Refer:
1. [Reduce the size of container images with DockerSlim](https://developers.redhat.com/articles/2022/01/17/reduce-size-container-images-dockerslim#)
2. [One docker container with multi process](https://www.cnblogs.com/liwenchao1995/p/16732217.html) (Not graceful:)
3. [How to use dumb-init to replace the pid1 in docker](https://promacanthus.netlify.app/cloud-native/docker/init-system/02-dumb-init%E4%BD%BF%E7%94%A8/)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.