-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (46 loc) · 2.53 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Author: Tom Vanmechelen @ KU Leuven (2024). Apache 2.0 License
#FROM python:alpine
FROM python:3.13.0-bookworm
RUN addgroup app --gid 10000 && adduser app --home /app --uid 10000 --ingroup app
USER app:app
# RUN apk add --update --no-cache --virtual .tmp-build-deps \
# gcc libc-dev linux-headers postgresql-dev musl-dev zlib zlib-dev \
# libressl-dev libffi-dev
# RUN mkdir -p /opt/exiftool \
# && cd /opt/exiftool \
# && EXIFTOOL_VERSION=`curl -s https://exiftool.org/ver.txt` \
# && EXIFTOOL_ARCHIVE=Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz \
# && curl -s -O https://exiftool.org/$EXIFTOOL_ARCHIVE \
# && CHECKSUM=`curl -s https://exiftool.org/checksums.txt | grep SHA1\(${EXIFTOOL_ARCHIVE} | awk -F'= ' '{print $2}'` \
# && echo "${CHECKSUM} ${EXIFTOOL_ARCHIVE}" | /usr/bin/sha1sum -c -s - \
# && tar xzf $EXIFTOOL_ARCHIVE --strip-components=1 \
# && rm -f $EXIFTOOL_ARCHIVE \
# && perl Makefile.PL \
# && make install \
# && exiftool -ver
#RUN mkdir -p /opt/exiftool; cd /opt/exiftool;
#RUN EXIFTOOL_VERSION=`curl -s https://exiftool.org/ver.txt`; EXIFTOOL_ARCHIVE=Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz; curl -s -O https://exiftool.org/$EXIFTOOL_ARCHIVE;
#RUN CHECKSUM=`curl -s https://exiftool.org/checksums.txt | grep SHA1\(${EXIFTOOL_ARCHIVE} | awk -F'= ' '{print $2}'`; echo "${CHECKSUM} ${EXIFTOOL_ARCHIVE}" | /usr/bin/sha1sum -c -;
#RUN tar xzf $EXIFTOOL_ARCHIVE --strip-components=1; rm -f $EXIFTOOL_ARCHIVE; perl Makefile.PL; make install; exiftool -ver;
#RUN pip install python-irodsclient
#RUN pip install mango-mdschema
#RUN pip install rich
#RUN pip install numpy
WORKDIR /app/mango-ingest
ADD ./src/ ./src
#RUN python -m venv venv
#RUN . venv/bin/activate
# RUN pip install --editable src
#RUN pip install python-magic
#RUN pip install pyexiftool
#RUN pip install boltons
USER root:root
ENV PATH="/venv/bin:$PATH"
RUN python -m venv /venv; . /venv/bin/activate; pip install --editable src;
RUN pip install mango-mdschema;
#RUN pip install pyexiftool
#RUN mkdir -p /opt/exiftool; cd /opt/exiftool;
#RUN EXIFTOOL_VERSION=`curl -s https://exiftool.org/ver.txt`; EXIFTOOL_ARCHIVE=Image-ExifTool-${EXIFTOOL_VERSION}.tar.gz; curl -s -O https://exiftool.org/$EXIFTOOL_ARCHIVE;
#RUN CHECKSUM=`curl -s https://exiftool.org/checksums.txt | grep SHA1\(${EXIFTOOL_ARCHIVE} | awk -F'= ' '{print $2}'`; echo "${CHECKSUM} ${EXIFTOOL_ARCHIVE}" | /usr/bin/sha1sum -c -;
#RUN tar xzf $EXIFTOOL_ARCHIVE --strip-components=1; rm -f $EXIFTOOL_ARCHIVE; perl Makefile.PL; make install; exiftool -ver;
WORKDIR /app/mango-ingest