Last active
March 12, 2018 09:02
-
-
Save zhangysh1995/a43571a0f06b44db8ffe3c5017857760 to your computer and use it in GitHub Desktop.
A Dockerfile to test Java project build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is an image to test building your projects, | |
# which may use Maven or Gradle | |
# | |
# basic info | |
FROM ubuntu:xenial-20180123 | |
MAINTAINER Yushan Zhang <[email protected]> | |
# software management | |
RUN apt-get update | |
RUN apt-get install -y vim python git sudo | |
RUN apt-get install -y openjdk-8-jdk | |
RUN apt-get install -y maven | |
RUN apt-get install -y software-properties-common | |
RUN add-apt-repository ppa:cwchien/gradle | |
RUN apt-get update | |
RUN apt install -y gradle | |
# user management | |
RUN useradd -s /bin/bash test | |
RUN usermod -aG sudo test | |
RUN mkhomedir_helper test | |
USER test | |
# others | |
RUN mkdir /home/test/data | |
RUN mkdir /home/test/build | |
WORKDIR /home/test | |
# back | |
USER root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment