Browse Source

Update Docker image to Debian.

scossu 4 months ago
parent
commit
ef159ddf98
5 changed files with 27 additions and 11 deletions
  1. 1 0
      .dockerignore
  2. 5 0
      .gitignore
  3. 14 5
      Dockerfile
  4. 1 0
      ext/.gitignore
  5. 6 6
      requirements.txt

+ 1 - 0
.dockerignore

@@ -0,0 +1 @@
+ext/arabic_rom/data

+ 5 - 0
.gitignore

@@ -133,3 +133,8 @@ tags.temp
 
 # Legacy Visual Basic files, not compatible  with license.
 *.bas
+
+
+# Local
+ext/arabic_rom/data
+!.keep

+ 14 - 5
Dockerfile

@@ -1,7 +1,12 @@
-FROM python:3.9-alpine3.15
+FROM python:3.10-slim-bullseye
 
-RUN apk add --no-cache -t buildtools build-base
-RUN apk add --no-cache linux-headers
+RUN apt update
+RUN apt install -y build-essential tzdata gfortran libopenblas-dev libboost-all-dev
+
+ENV TZ=America/New_York
+
+# Copy and compile Kakadu codec.
+WORKDIR ${_workroot}
 
 ENV _workroot "/usr/local/scriptshifter/src"
 
@@ -15,11 +20,15 @@ COPY ext ./ext/
 
 COPY scriptshifter ./scriptshifter/
 RUN chmod +x ./entrypoint.sh
-RUN addgroup -S www && adduser -S www -G www
+
+RUN addgroup --system www
+RUN adduser --system www
+RUN gpasswd -a www www
 RUN chown -R www:www ${_workroot} .
 
 # Remove development packages.
-RUN apk del buildtools
+RUN apt remove -y build-essential
+RUN apt autoremove -y
 
 EXPOSE 8000
 

+ 1 - 0
ext/.gitignore

@@ -0,0 +1 @@
+arabic_rom/data

+ 6 - 6
requirements.txt

@@ -1,9 +1,9 @@
-aksharamukha>=2.1,<2.2
-camel-tools>=1.1.0
-flask>=2.3,<2.4
-funcy==1.15
-pymarc>=4.0.0
+aksharamukha>=2.1,<3
+camel-tools>=1.5
+flask>=2.3,<3
+#funcy>=1.15,<2
+#pymarc>=4.0,<5
 python-dotenv>=1.0,<2
 pyyaml>=6.0,<7
-repackage>=0.7.3
+#repackage>=0.7.3
 uwsgi>=2.0,<2.1