Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Dockerfile to make basic Image of Bioinformatics Analysis

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail "how to use Dockerfile to make a basic image of bioinformation analysis". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to use Dockerfile to make a basic image of bioinformation analysis" can help you solve your doubts.

Use Dockerfile to customize the image

Dockerfile is a text file that contains Instruction, each of which builds a layer, so the content of each instruction is to describe how the layer should be built.

Also take the previous customized centos7 image as an example, this time we use Dockerfile to customize.

In a blank directory, create a text file and name it Dockerfile:

$mkdir mydocker$ cd mydocker$ touch Dockerfile

Its contents are as follows:

# Base imageFROM centos:centos7# METADATA # # LABEL base.image= "centos:7"\ version= "1"\ software= "Biocontainers base Image"\ software.version= "20200312"\ about.summary= "Base image for"\ about.home= "www..com"\ about Genomics = ""\ license= ""\ about.tags= "Genomics Proteomics,Transcriptomics,General Metabolomics "# MAINTAINER # # MAINTAINER huangls # COPY Miniconda3-latest-Linux-x86_64.sh / tmp/miniconda.sh#ENV LANG=C.UTF-8 LC_ALL=C.UTF-8ENV PATH / biosoft/miniconda/bin:$PATHRUN yum-y update & & yum upgrade-y\ & & yum-y install bzip2 openssl openssh-clients\ Cmake zlib libpng libpng12 libtiff libjpeg boost\ wget zip which less tree\ & & yum clean all\ & & mkdir-p / biosoft/miniconda\ & & wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh-O / tmp/miniconda.sh\ & & bash / tmp/miniconda.sh-bfp / biosoft/miniconda\ & & rm-rf / tmp / miniconda.sh\ & & ln-s / biosoft/miniconda/etc/profile.d/conda.sh / etc/profile.d/conda.sh\ & & echo ". / biosoft/miniconda/etc/profile.d/conda.sh "> ~ / .bashrc\ & & echo" alias e =\ "less-S\"> > ~ / .bashrc\ & & echo" alias ee=\ "less-SN\" > > ~ / .bashrc\ & & echo "alias l =\" ls-lhtr "\" > ~ / .bashrc\ & echo "alias ll=\" ls-lh\ "> > ~ / .bashrc\" & echo "export PS1=\"\ [\ e [32m\] [\ [\ e [35m\]\ u\ [\ e [35m\] @\ [\ e [36m\]\ h\ [\ e [31m\]\ t\ w\ [\ e [32m\]]\ [\ e [36m\]] # [\ e [m\] "> > ~ / .bashrc\ # & & conda config-- add channels bioconda\ # & conda config -- add channels conda-forge\ # & & conda config-- add channels genomedk\ & & conda config-- add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/\ & & conda config-- add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/\ & conda config-- add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs / mro/\ & & conda config-- add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/\ & & conda config-- add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/\ & & conda config-- add channels http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/\ & & conda config-- set Show_channel_urls yes\ & & conda config-- set ssl_verify no\ & & conda clean-- yes # RUN conda update conda-y & & conda upgrade conda-y\ VOLUME ["/ work"] # Overwrite this with 'CMD []' in a dependent DockerfileCMD ["/ bin/bash"] WORKDIR / work execution to get the image $docker build-t / biocontainer-base:latest .Sending build context to Docker daemon 2.048 kB...FROM specifies the basic image

The so-called custom image, it must be based on an image, customized on it. Just as we ran a container of nginx images before, and then modified them, the underlying image must be specified. FROM specifies the base image, so FROM is a necessary instruction in a Dockerfile, and it must be the first instruction.

RUN executes command

The RUN instruction is used to execute command-line commands. Because of the power of the command line, the RUN instruction is one of the most commonly used instructions when customizing images.

After reading this, the article "how to use Dockerfile to make a basic image of bioinformatics analysis" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report