代码拉取完成,页面将自动刷新
FROM ubuntu:16.04
ENV MAVEN_VERSION 3.5.4
ENV NODE_VERSION 10.13.0
ENV PHANTOMJS_VERSION 2.1.1
ARG UID=1000
ARG GID=1000
USER root
RUN apt-get update
#========================
# Miscellaneous packages
#========================
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
sudo \
openjdk-8-jdk \
tar \
zip xz-utils \
curl wget \
git \
build-essential \
python \
iputils-ping \
net-tools \
locales \
libsass-dev \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i 's/securerandom\.source=file:\/dev\/random/securerandom\.source=file:\/dev\/urandom/' ./usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security
# Set utf-8 locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
#==========
# Maven
#==========
RUN curl -fsSL http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
ENV MAVEN_HOME /usr/share/maven
#===============
# Node and NPM
#===============
RUN wget --no-verbose https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz -O /opt/nodejs.tar.xz
RUN tar -C /usr/local --strip-components 1 -xJf /opt/nodejs.tar.xz
RUN mkdir /.npm && chmod 777 /.npm
#=============================================
# Misc packages needed by the ATH
#=============================================
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
libxml2-utils \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
#=============================================
# Phantom JS
#=============================================
RUN wget --no-verbose -O - -L https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 \
| tar -xj --strip-components=1 -C /usr/local
#========================================
# Add normal user with passwordless sudo
#========================================
RUN sudo groupadd -r -g $GID bouser \
&& sudo useradd bouser -g $GID -u $UID --shell /bin/bash --create-home \
&& sudo usermod -a -G sudo bouser \
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'bouser:secret' | chpasswd
USER bouser
WORKDIR /home/bouser
#========================================
# Configure the local git user.
#========================================
RUN git config --global user.name "John Doe"
RUN git config --global user.email johndoe@example.com
#========================================
# Need ssh
#========================================
RUN sudo apt-get update -qqy && sudo apt-get install -y ssh
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。