Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Maven Build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Docker
Maven Build
Commits
1de4283b
Commit
1de4283b
authored
6 years ago
by
Daniel Speicher
Browse files
Options
Downloads
Patches
Plain Diff
Change structure to just to RUN commands. Cleanup installation files.
parent
653e601d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#8903
passed
5 years ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+45
-47
45 additions, 47 deletions
Dockerfile
with
45 additions
and
47 deletions
Dockerfile
+
45
−
47
View file @
1de4283b
...
...
@@ -5,62 +5,60 @@ LABEL com.example.vendor="bitegra e.K." \
version="1.0.0" \
description="Base Maven image to build Java Spring Boot applications."
# Install git and curl wget gnupg2
RUN
apt-get update
&&
\
apt-get
install
-y
git curl wget gnupg2
&&
\
apt-get clean
;
# Install Java
ARG
JAVA_VERSION=11
RUN
echo
"deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main"
|
tee
/etc/apt/sources.list.d/linuxuprising-java.list
RUN
apt-key adv
--keyserver
hkp://keyserver.ubuntu.com:80
--recv-keys
73C3DB2A
RUN
apt-get update
&&
\
echo
oracle-java11-installer shared/accepted-oracle-license-v1-2
select
true
| /usr/bin/debconf-set-selections
&&
\
apt-get
install
-y
oracle-java11-set-default
ENV
JAVA_HOME=/usr/lib/jvm/java-11-oracle
# Install Maven
ARG
MAVEN_VERSION=3.6.0
ARG
NODE_VERSION=11.x
ARG
USER_HOME_DIR="/root"
ARG
SHA=fae9c12b570c3ba18116a4e26ea524b29f7279c17cbaadc3326ca72927368924d9131d11b9e851b8dc9162228b6fdea955446be41207a5cfc61283dd8a561d2f
ARG
BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries
RUN
mkdir
-p
/usr/share/maven /usr/share/maven/ref
\
mkdir
-p
/usr/share/maven /usr/share/maven/ref
\
&&
curl
-fsSL
-o
/tmp/apache-maven.tar.gz
${
BASE_URL
}
/apache-maven-
${
MAVEN_VERSION
}
-bin
.tar.gz
\
&&
echo
"
${
SHA
}
/tmp/apache-maven.tar.gz"
|
sha512sum
-c
-
\
&&
tar
-xzf
/tmp/apache-maven.tar.gz
-C
/usr/share/maven
--strip-components
=
1
\
&&
rm
-f
/tmp/apache-maven.tar.gz
\
&&
ln
-s
/usr/share/maven/bin/mvn /usr/bin/mvn
ENV
MAVEN_HOME /usr/share/maven
ENV
MAVEN_CONFIG "$USER_HOME_DIR/.m2"
# Install Docker
# Repository
RUN
apt-get update
&&
\
apt-get
install
-y
apt-transport-https software-properties-common
echo
"Install gut, curl, wget, gnupg2..."
&&
\
apt-get
install
-y
git curl wget gnupg2
RUN
curl
-fsSL
https://download.docker.com/linux/ubuntu/gpg | apt-key add -
&&
\
apt-key fingerprint 0EBFCD88
&&
\
add-apt-repository
\
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(
lsb_release
-cs
)
stable"
# Install Docker CE
RUN
apt-get update
&&
\
apt-get
install
-y
docker-ce
# Install NodeJS
RUN
curl
-sL
https://deb.nodesource.com/setup_11.x | bash -
RUN
apt-get update
&&
\
apt-get
install
-y
nodejs
# Install Headless Chrome
RUN
apt-get update
&&
\
RUN
echo
"Install Java JDK..."
&&
\
echo
"deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main"
|
tee
/etc/apt/sources.list.d/linuxuprising-java.list
&&
\
apt-key adv
--keyserver
hkp://keyserver.ubuntu.com:80
--recv-keys
73C3DB2A
&&
\
echo
oracle-java11-set-default shared/accepted-oracle-license-v1-2
select
true
| /usr/bin/debconf-set-selections
&&
\
apt-get update
&&
\
apt-get
install
-y
oracle-java11-set-default
&&
\
\
\
echo
"Install Maven..."
&&
\
mkdir
-p
/usr/share/maven /usr/share/maven/ref
&&
\
curl
-fsSL
-o
/tmp/apache-maven.tar.gz
${
BASE_URL
}
/apache-maven-
${
MAVEN_VERSION
}
-bin
.tar.gz
&&
\
echo
"
${
SHA
}
/tmp/apache-maven.tar.gz"
|
sha512sum
-c
-
&&
\
tar
-xzf
/tmp/apache-maven.tar.gz
-C
/usr/share/maven
--strip-components
=
1
&&
\
rm
-f
/tmp/apache-maven.tar.gz
&&
\
ln
-s
/usr/share/maven/bin/mvn /usr/bin/mvn
&&
\
\
\
echo
"Install Docker Repository..."
&&
\
apt-get
install
-y
apt-transport-https software-properties-common
&&
\
curl
-fsSL
https://download.docker.com/linux/ubuntu/gpg | apt-key add -
&&
\
apt-key fingerprint 0EBFCD88
&&
\
add-apt-repository
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(
lsb_release
-cs
)
stable"
&&
\
\
echo
"Install Docker CE..."
&&
\
apt-get
install
-y
docker-ce
&&
\
\
\
echo
"Install NodeJs..."
&&
\
curl
-sL
https://deb.nodesource.com/setup_
${
NODE_VERSION
}
| bash -
&&
\
apt-get
install
-y
nodejs
&&
\
\
\
echo
"Install Headless Chrome..."
&&
\
apt-get
install
-y
libappindicator3-1 fonts-liberation libxss1 xdg-utils libasound2 libnspr4 libnss3
&&
\
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
&&
\
dpkg
-i
google-chrome
*
.deb
dpkg
-i
google-chrome
*
.deb
&&
\
rm
google-chrome-stable_current_amd64.deb
&&
\
rm
-rf
/var/lib/apt/lists/
*
/var/cache/apt/
*
&&
\
apt-get clean
;
ENV
JAVA_HOME=/usr/lib/jvm/java-11-oracle
ENV
MAVEN_HOME /usr/share/maven
ENV
MAVEN_CONFIG "$USER_HOME_DIR/.m2"
CMD
/bin/bash
\ No newline at end of file
CMD
/bin/bash
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment