mirror of
https://github.com/rasilon/ujetl.git
synced 2026-04-11 10:29:29 +00:00
Add multistage docker build
This commit is contained in:
parent
3bfc9d6a1b
commit
ea629b3098
2 changed files with 40 additions and 0 deletions
23
docker/multistage/Dockerfile
Normal file
23
docker/multistage/Dockerfile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
FROM centos:centos7 as builder
|
||||
RUN yum -y install epel-release java-1.8.0-openjdk-devel
|
||||
RUN yum -y groupinstall 'Development Tools'
|
||||
RUN yum -y install git maven
|
||||
RUN git clone https://github.com/rasilon/ujetl.git
|
||||
RUN cd ujetl && mvn package
|
||||
|
||||
|
||||
|
||||
|
||||
FROM centos:centos7
|
||||
MAINTAINER Derry Hamilton <derryh@rasilon.net>
|
||||
|
||||
RUN yum -y install epel-release
|
||||
RUN yum -y install java-1.8.0-openjdk-devel
|
||||
|
||||
RUN mkdir -p /usr/share/ujetl/lib/ /var/ujetl /etc/ujetl
|
||||
|
||||
COPY --from=builder /ujetl/target/CopyingApp-2.*-jar-with-dependencies.jar /usr/share/ujetl/lib/CopyingApp.jar
|
||||
COPY --from=builder /ujetl/install_extra/copying_defaults_log4j.xml /etc/ujetl/
|
||||
COPY ujetl_entrypoint /
|
||||
ENTRYPOINT ["/ujetl_entrypoint"]
|
||||
|
||||
17
docker/multistage/ujetl_entrypoint
Executable file
17
docker/multistage/ujetl_entrypoint
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
LOG_PROPS=/etc/ujetl/copying_defaults_log4j.xml
|
||||
|
||||
cd /var/ujetl
|
||||
for file in *.xml
|
||||
do
|
||||
/usr/bin/java \
|
||||
-Xms1g \
|
||||
-Xmx2g \
|
||||
-cp /usr/share/ujetl/lib/CopyingApp.jar \
|
||||
com.rasilon.ujetl.CopyingApp \
|
||||
--log4j "$LOG_PROPS" \
|
||||
--config "$file"
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue