Commit 83180623 authored by xuebingbing's avatar xuebingbing

新增docker ubuntu1804

parent 8dba0d3f
# 指定基础镜像
ARG BASE_IMAGE=ubuntu:18.04
FROM $BASE_IMAGE as builder
# MAINTAINER
MAINTAINER xuebingbing@juefx.com
WORKDIR /
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" > /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list
RUN apt-get update -y \
&& apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes apt-utils autoconf pkg-config libtool cmake \
libpdal-dev libpcl-dev git vim
WORKDIR /build
RUN git clone --branch master http://git.corp.roadlinks.cn:2020/xueye9/fmt_converter.git fmt_converter
Workdir /build/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/installed /build/fmt_converter \
&& make -j16 && make install
#编译相关自己的源代码
#通过拷贝的方式减小镜像大小 build final image
FROM $BASE_IMAGE as runner
RUN date
RUN apt-get update -y \
&& apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes apt-utils \
&& pdal libpcl-dev libpcl-io1.8
#RUN apt-get update -y \
# && apt upgrade -y \
# && DEBIAN_FRONTEND=noninteractive apt-get install $依赖库
#
COPY --from builder /build/build/installed/include/* /usr/include
COPY --from builder /build/build/installed/bin/* /usr/bin
COPY --form builder /build/build/installed/lib/* /usr/lib/x86_64-linux-gnu
COPY --form builder /build/build/installed/share/* /usr/share
ENV LANG C.UTF-8
RUN ldconfig
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment