added docker stuff
This commit is contained in:
parent
35c802bf7a
commit
e1e69a85f6
21
.build/Dockerfile
Normal file
21
.build/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM python:3.9.16-slim-bullseye
|
||||
|
||||
# Set build shell to bash, default has has some issues sometimes
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# Install packges
|
||||
RUN apt update \
|
||||
&& apt install --no-install-recommends -y imagemagick jq curl tesseract-ocr nano
|
||||
|
||||
WORKDIR /var/www/html
|
||||
COPY . /var/www/html/
|
||||
RUN chmod 777 .
|
||||
|
||||
# del usesless files
|
||||
RUN rm -rf \
|
||||
/var/lib/{apt,dpkg} \
|
||||
/var/{cache,log,spool} \
|
||||
/var/www/html/{.git,.build,README.md,env.example,docker-compose.yml,.gitignore}
|
||||
RUN mkdir -p logs
|
||||
|
||||
CMD python3 -m http.server --cgi 8000 --directory public
|
7
.build/docker-compose.yml
Normal file
7
.build/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
services:
|
||||
reciptocr:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .build/Dockerfile
|
||||
hostname: reciptocr
|
||||
image: reciptocr
|
Loading…
x
Reference in New Issue
Block a user