【How to build:】
cd /home/ops/work/demo/docker/aws/src
touch Dockerfile
docker build -t aws_src_image:v1.0 .
【Test:】
docker run -p 10023:22 -d aws_src_image:v1.0 /usr/sbin/sshd -D
ssh -p 10023 127.0.0.1
【Dockerfile:】
FROM ubuntu_base:v1.0
MAINTAINER jbding <[email protected]>
WORKDIR /home
RUN mkdir /home/ops
RUN mkdir /home/ops/fangdai
RUN mkdir /home/ops/fangdai/perl
RUN mkdir /home/ops/fangdai/dp
RUN mkdir /home/ops/fangdai/dp/scripts
RUN mkdir /home/ops/fangdai/nifi
RUN mkdir /home/ops/fangdai/jvm
WORKDIR /home/ops
COPY wg.tar.gz /home/ops/fangdai
COPY perl5.tar.gz /home/ops/fangdai
COPY filib.tar.gz /home/ops/fangdai/perl
COPY perl-5.16.3.tar.gz /home/ops/fangdai/perl
COPY mort_feed_cycle.tar.gz /home/ops/fangdai/dp/scripts
COPY java-8-oracle.tar.gz /home/ops/fangdai/jvm
COPY nifi-1.1.2.tar.gz /home/ops/fangdai/nifi
RUN cd /home/ops/fangdai/dp/scripts
WORKDIR /home/ops/fangdai/dp/scripts
RUN tar -zxvf mort_feed_cycle.tar.gz
RUN rm -f /home/ops/fangdai/dp/scripts/mort_feed_cycle.tar.gz
RUN cd /home/ops/fangdai/nifi
WORKDIR /home/ops/fangdai/nifi
RUN tar -zxvf nifi-1.1.2.tar.gz
RUN rm -f /home/ops/fangdai/nifi/nifi-1.1.2.tar.gz
RUN cd /home/ops/fangdai/perl
WORKDIR /home/ops/fangdai/perl
RUN tar -zxvf filib.tar.gz
RUN rm -f /home/ops/fangdai/perl/filib.tar.gz
RUN tar -zxvf perl-5.16.3.tar.gz
RUN rm -f /home/ops/fangdai/perl/perl-5.16.3.tar.gz
RUN cd /home/ops/fangdai
WORKDIR /home/ops/fangdai
RUN tar -zxvf wg.tar.gz
RUN rm -f /home/ops/fangdai/wg.tar.gz
RUN tar -zxvf perl5.tar.gz
RUN rm -f /home/ops/fangdai/perl5.tar.gz
ENV PERL5LIB=/home/ops/fangdai/perl5/lib/perl5:/home/ops/fangdai/perl/filib
ENV PATH $PATH:/home/ops/fangdai/perl5/bin
RUN cd /home/ops/fangdai/jvm
WORKDIR /home/ops/fangdai/jvm
RUN tar -zxvf java-8-oracle.tar.gz
RUN rm -f /home/ops/fangdai/jvm/java-8-oracle.tar.gz
ENV JAVA_HOME /home/ops/fangdai/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin
RUN ln -s /home/ops/fangdai/perl/perl-5.16.3/bin/perl /usr/bin/perl5
WORKDIR /home/ops/fangdai/dp/scripts
请发表评论