Browse Source

add Dockerfile to DataLad container

Lennart Wittkuhn 1 year ago
parent
commit
69bbfe9a55
3 changed files with 34 additions and 0 deletions
  1. 2 0
      .docker/.gitattributes
  2. 31 0
      .docker/datalad/Dockerfile
  3. 1 0
      .gitattributes

+ 2 - 0
.docker/.gitattributes

@@ -0,0 +1,2 @@
+
+* annex.largefiles=nothing

+ 31 - 0
.docker/datalad/Dockerfile

@@ -0,0 +1,31 @@
+FROM python:3-slim
+
+ARG DOCKER_TAG
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get -y update
+RUN apt-get -y install --no-install-recommends locales curl gnupg
+RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+RUN locale-gen
+
+# add neurodebian sources for git-annex-standalone
+RUN curl http://neuro.debian.net/lists/buster.de-m.full > /etc/apt/sources.list.d/neurodebian.sources.list
+RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xA5D32F012649A5A9
+RUN apt-get -y update
+
+# rclone is a useful add-on
+RUN curl -O https://downloads.rclone.org/v1.59.2/rclone-v1.59.2-linux-arm64.deb && dpkg -i rclone*deb && rm -f rclone*deb
+
+# install packages
+RUN apt-get -y install --no-install-recommends git git-annex-remote-rclone git-annex make
+
+RUN pip3 install "datalad${DOCKER_TAG+==$DOCKER_TAG}"
+
+# clean up
+RUN apt-get clean
+
+RUN git config --global user.name "Docker Datalad"
+RUN git config --global user.email "docker-datalad@example.com"
+
+ENTRYPOINT ["datalad"]

+ 1 - 0
.gitattributes

@@ -10,3 +10,4 @@ renv.lock annex.largefiles=nothing
 .gitignore annex.largefiles=nothing
 index.qmd annex.largefiles=nothing
 .github/workflows/main.yml annex.largefiles=nothing
+/.docker/ annex.largefiles=nothing