Merge branch '21543-lightning-subdir'
[lightning.git] / docker / lightning / Dockerfile
index d92060264ff974461f2d4b7acc9f65f51145dc44..7175ffc33b2eee57b171abbd418ed5e5c0daf7ab 100644 (file)
@@ -2,10 +2,11 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-FROM ubuntu:latest
-MAINTAINER Jiayong Li <jli@curii.com>
+# build instruction:
+# docker build -t dockername --file=/path/to/lightning/docker/lightning/Dockerfile /path/to/lightning/go-lightning
+
+FROM python:3.11-buster
 USER root
-ARG DEBIAN_FRONTEND=noninteractive
 
 # Install necessary dependencies
 
@@ -21,27 +22,16 @@ RUN apt-get install -qy --no-install-recommends wget \
   libncursesw5-dev \
   gcc \
   make \
-  python3.8 \
-  python3-pip \
-  python3-numpy \
-  python3-pandas \
-  python3-scipy \
-  python3-matplotlib \
   git
 
-RUN pip3 install sklearn
-RUN pip3 install --upgrade scipy
-
-# Installing go 1.19
+RUN pip install --upgrade pip matplotlib numpy pandas scikit-learn scipy
 
-RUN wget https://go.dev/dl/go1.19.3.linux-amd64.tar.gz && \
-    tar -C /usr/local -xzf go1.19.3.linux-amd64.tar.gz
+RUN wget --progress=dot:giga https://go.dev/dl/go1.22.2.linux-amd64.tar.gz && \
+    tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
 
 ENV PATH $PATH:/usr/local/go/bin:/root/go/bin
 
 # Getting lightning
 
-RUN git clone https://github.com/arvados/lightning && \
-    cd lightning && make
-
-WORKDIR /
+COPY . /lightning
+RUN cd /lightning && make && cd / && rm -rf lightning