Dockerfile + makefile, #6
This commit is contained in:
parent
31471106bc
commit
c10fd1c488
28
Dockerfile
28
Dockerfile
@ -1,20 +1,30 @@
|
||||
|
||||
FROM debian:bullseye-20210111
|
||||
FROM debian:bullseye
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential git \
|
||||
# install requirements
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
build-essential \
|
||||
g++ make git \
|
||||
python3 python3-pip
|
||||
|
||||
RUN g++ -v
|
||||
# check compiler and current user
|
||||
RUN g++ -v && whoami
|
||||
|
||||
COPY ./ /tdm_ripper/
|
||||
# use /home as working directory
|
||||
WORKDIR /home
|
||||
|
||||
# get the public TDMtermite repository
|
||||
RUN git clone https://github.com/RecordEvolution/TDMtermite.git
|
||||
|
||||
# install CLI tool
|
||||
RUN cd /tdm_ripper && ls -lh && make install && ls -lh /usr/local/bin/tdmreaper
|
||||
RUN cd ./TDMtermite && ls -lh && make install && ls -lh /usr/local/bin/tdmtermite
|
||||
|
||||
# install Python module
|
||||
RUN cd /tdm_ripper && ls -lh && make cython-requirements && make cython-install
|
||||
RUN cd ./TDMtermite && ls -lh && make cython-requirements && make cython-list && make cython-install
|
||||
|
||||
# create directory for data exchange
|
||||
#RUN [ "/bin/bash", "-c", "mkdir -pv data/{input,output}" ]
|
||||
RUN mkdir -pv data
|
||||
|
||||
CMD ["sleep","inifity"]
|
||||
|
||||
|
15
makefile
15
makefile
@ -1,5 +1,7 @@
|
||||
# --------------------------------------------------------------------------- #
|
||||
|
||||
SHELL := /bin/bash
|
||||
|
||||
# declare name of executable
|
||||
EXE = tdmtermite
|
||||
|
||||
@ -23,8 +25,9 @@ GHSH := $(shell git rev-parse HEAD | head -c8)
|
||||
# define install location
|
||||
INST := /usr/local/bin
|
||||
|
||||
# platform
|
||||
# platform and current working directory
|
||||
OST := $(shell uname)
|
||||
CWD := $(shell pwd)
|
||||
|
||||
# --------------------------------------------------------------------------- #
|
||||
# CLI tool
|
||||
@ -89,6 +92,16 @@ clean-cython :
|
||||
rm -vf tdm_termite.cpython-*.so python/tdm_termite.cpython-*.so
|
||||
rm -rf build
|
||||
|
||||
# --------------------------------------------------------------------------- #
|
||||
# docker
|
||||
|
||||
docker-build:
|
||||
docker build . --tag tdmtermite:latest
|
||||
|
||||
docker-run:
|
||||
mkdir -pv data/{input,output}
|
||||
docker run -it --rm --volume $(CWD)/data:/home/data tdmtermite:latest /bin/bash
|
||||
|
||||
# --------------------------------------------------------------------------- #
|
||||
|
||||
clean : clean-cpp clean-cython
|
||||
|
Loading…
x
Reference in New Issue
Block a user