自定义镜像构建
| src/zqyy/elasticsearch | ||
| .gitignore | ||
| docker-compose.yml | ||
| README.md | ||
zqyy-dockerfile
This repository keeps Dockerfiles under each image directory and uses one root
docker-compose.yml as the unified build/run entrypoint.
Layout
docker-compose.yml
src/
zqyy/
elasticsearch/
Dockerfile
config/
dictionaries/
README.md
test-hanlp.sh
Build Images
Build one image:
docker compose build elasticsearch-hanlp
Build all images defined in the root compose file:
docker compose build
Run Services
Run one service:
docker compose up -d elasticsearch-hanlp
Run all services:
docker compose up -d
Add A New Image
- Create a new image directory under
src/zqyy/<image-name>/. - Put that image's
Dockerfileand related files in the image directory. - Add a service in the root
docker-compose.yml. - Set
build.contextto the image directory, for example:
services:
example:
image: zqyy/example:latest
build:
context: ./src/zqyy/example
dockerfile: Dockerfile