parent
0bff488383
commit
113a1931b7
@ -0,0 +1,9 @@
|
||||
FROM python:3.10.0-alpine
|
||||
|
||||
ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install mkdocs-material==9.5.5 mkdocs-glightbox
|
||||
|
||||
WORKDIR /hello-algo
|
||||
|
||||
EXPOSE 8000
|
@ -0,0 +1,23 @@
|
||||
VERBOSE=--verbose
|
||||
|
||||
all: # do nothing by default
|
||||
@echo "usage: make [build-docker|run-dev|dev|stop|sh]"
|
||||
|
||||
build-docker: # build dev container
|
||||
# docker build -t hello-algo-dev -f Dockerfile-dev .
|
||||
docker compose -f docker-compose-dev.yml build
|
||||
|
||||
buildx-docker:
|
||||
docker build -t hello-algo-dev -f Dockerfile-dev . --load
|
||||
|
||||
run-dev: # run in background
|
||||
docker compose -f docker-compose-dev.yml up -d
|
||||
|
||||
dev: # run dev container
|
||||
docker compose -f docker-compose-dev.yml $(VERBOSE) up
|
||||
|
||||
stop: # stop dev container
|
||||
docker compose -f docker-compose-dev.yml down
|
||||
|
||||
sh: # go to dev container shell
|
||||
docker exec -it hello-algo-dev sh
|
@ -0,0 +1,21 @@
|
||||
services:
|
||||
hello-algo-dev:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-dev
|
||||
image: hello-algo-dev
|
||||
container_name: hello-algo-dev
|
||||
ports:
|
||||
- "${HTTP_PORT:-8000}:8000"
|
||||
# tty: true
|
||||
# stdin_open: true
|
||||
entrypoint:
|
||||
# - "/bin/sh"
|
||||
- mkdocs
|
||||
- serve
|
||||
- -a
|
||||
- 0.0.0.0:8000
|
||||
volumes:
|
||||
- ./:/hello-algo
|
||||
- ./docs:/hello-algo/build/docs
|
||||
- ./overrides:/hello-algo/build/overrides
|
Loading…
Reference in new issue