added docker stuff

This commit is contained in:
Shihaam Abdul Rahman 2024-08-03 05:22:17 +05:00
parent 35c802bf7a
commit e1e69a85f6
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636
2 changed files with 28 additions and 0 deletions

21
.build/Dockerfile Normal file
View 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

View File

@ -0,0 +1,7 @@
services:
reciptocr:
build:
context: ..
dockerfile: .build/Dockerfile
hostname: reciptocr
image: reciptocr