Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Patchwork from v0.5.2 to v0.5.5 #538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions patchwork/0.5.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# To reduce the final image size, the build process has been split into a build
# stage and a production stage. After compiling Patchwork, the Julia
# installation is no longer needed and is therefore removed in the second stage.

# Stage 1/2: Build
# ----------------

# Set the base image
FROM ubuntu:22.04 AS builder

# System is non-interactive when building the Docker image
ENV DEBIAN_FRONTEND noninteractive

# Set time zone to Zurich, Europe
ENV TZ=Europe/Zurich
RUN ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime && echo "$TZ" > /etc/timezone

# Update the repository sources and install required tools and libraries
RUN apt-get update && apt-get install --yes --no-install-recommends \
apt-utils \
wget \
gcc \
ca-certificates \
python3-matplotlib \
libqt5widgets5 \
git

# Set work directory
WORKDIR '/opt'

# Download and install Julia
RUN wget --quiet 'https://julialang-s3.julialang.org/bin/linux/x64/1.9/julia-1.9.3-linux-x86_64.tar.gz' \
&& tar -xvzf 'julia-1.9.3-linux-x86_64.tar.gz' \
&& rm 'julia-1.9.3-linux-x86_64.tar.gz'
ENV PATH "/opt/julia-1.9.3/bin:${PATH}"

# Download and install DIAMOND
RUN wget 'http://github.com/bbuchfink/diamond/releases/download/v2.1.8/diamond-linux64.tar.gz' \
&& tar -xvzf 'diamond-linux64.tar.gz' \
&& mv 'diamond' '/usr/local/bin' \
&& rm 'diamond-linux64.tar.gz'

# Download and install Patchwork
RUN git clone 'https://github.com/fethalen/patchwork' \
&& cd patchwork/build \
&& ./build_app.jl

# Stage 2/2: Production
# ---------------------

# Set the base image
FROM ubuntu:22.04 AS production

# Metadata
LABEL org.opencontainers.image.authors="[email protected]"
LABEL version="1"
LABEL software="Patchwork"
LABEL software.version="0.5.5"
LABEL about.author="Felix Thalén <[email protected]>"
LABEL about.summary="Alignment-based Exon Retrieval and Concatenation with Phylogenomic Applications"
LABEL about.home="https://github.com/fethalen/patchwork"
LABEL about.documentation="https://github.com/fethalen/patchwork#readme"
LABEL about.license="SPDX:GPL-3.0"
LABEL about.tags="phylogenomics, phylogenetics, genomics, alignment"

# System is non-interactive when building the Docker image
ENV DEBIAN_FRONTEND noninteractive

# Set time zone to Zurich, Europe
ENV TZ=Europe/Zurich
RUN ln -snf "/usr/share/zoneinfo/${TZ}" /etc/localtime && echo "$TZ" > /etc/timezone

# Create the user
RUN useradd --create-home --shell /bin/bash --user-group --uid 1000 patchwork

# Set the default user
USER patchwork

# Set the working directory
WORKDIR /home/patchwork

COPY --from=builder /opt/patchwork/build/compiled /opt/patchwork
COPY --from=builder /usr/local/bin/diamond /usr/local/bin/diamond
ENV PATH /opt/patchwork/bin:$PATH

ENTRYPOINT ["patchwork"]