remove root compose file for a Makefile; move Dockerfile; adjust drone file

This commit is contained in:
Jörn-Michael Miehe 2024-01-08 18:24:50 +01:00
parent b2d93d7283
commit 9103180c36
4 changed files with 27 additions and 20 deletions

View file

@ -7,8 +7,6 @@ steps:
image: plugins/docker
settings:
repo: ldericher/autodoc
context: src
dockerfile: src/Dockerfile
auto_tag: true
username:
from_secret: DOCKER_USERNAME

View file

@ -8,6 +8,7 @@ RUN set -ex; \
make \
;
COPY usr /usr
COPY src/usr /usr
CMD ["autodoc", "-bw"]
ENTRYPOINT ["autodoc"]
CMD ["-bw"]

24
Makefile Normal file
View file

@ -0,0 +1,24 @@
image_tag = ldericher/autodoc
docker_build = docker build
docker_run = docker run --rm -it
examples_flags = -v "$(shell pwd)/examples:/data" -u "$(shell id -u):$(shell id -g)"
.PHONY: default
default:
$(info use other targets: image build watch clean)
.PHONY: image
image:
$(docker_build) --tag $(image_tag) ./
.PHONY: build
build: image
$(docker_run) $(examples_flags) $(image_tag) -b
.PHONY: watch
watch: image
$(docker_run) $(examples_flags) $(image_tag)
.PHONY: clean
clean:
git clean -xdf ./examples

View file

@ -1,16 +0,0 @@
version: "2"
services:
autodoc:
restart: "no"
image: ldericher/autodoc
build:
context: ./src
command: "bash"
volumes:
- "${PWD}/src/usr/local/bin/autodoc:/usr/local/bin/autodoc:ro"
- "${PWD}/src/usr/local/lib/autodoc:/usr/local/lib/autodoc:ro"
- "${PWD}/examples:/docs"