diff --git a/Dockerfile b/Dockerfile index af4ad2718..933cea23e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,25 @@ -FROM alpine:3.21.0 +FROM ubuntu:24.04 # Install build dependencies -RUN apk add --no-cache build-base cmake +RUN apt-get update && \ + apt-get install -y build-essential cmake + +# Add a non-root user +RUN groupadd -r hyphyuser && useradd -r -g hyphyuser hyphyuser # Create a directory for the project WORKDIR /hyphy # Copy project files -COPY . /hyphy +COPY ./cmake /hyphy/cmake +COPY ./src /hyphy/src +COPY ./contrib /hyphy/contrib +COPY ./res /hyphy/res +COPY CMakeLists.txt /hyphy + +RUN chown -R hyphyuser:hyphyuser . # Install project RUN cmake . && make install + +USER hyphyuser diff --git a/README.md b/README.md index 6f74feaba..2a1ecb212 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,15 @@ HyPhy is an open-source software package for the analysis of genetic sequences u `conda install -c bioconda hyphy` #### Running with Docker -You can also run HyPhy without having to install it on your system using the provided Dockerfile. Following the below instructions starts an interactive Docker container where HyPhy is already available. +You can also run HyPhy without having to install it on your system using the provided Dockerfile. Following the below instructions starts an interactive Docker container where HyPhy is already available. + +**Please note you must change this code snippet to point to the appropriate location for your input data. This will be made available inside the container at `/hyphy/data`.** ``` git clone https://github.com/veg/hyphy.git cd hyphy docker build -t hyphy:latest . -docker run --rm -it hyphy:latest +docker run --rm -v [path-to-your-input-data]:/hyphy/data -it hyphy:latest ``` #### Run with Command Line Arguments