-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
40 lines (32 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
############################################
# #
# BUILD PHASE #
# #
############################################
FROM centos:7 AS BUILDER
MAINTAINER supporto.sviluppo@laserromae.it
# installing maven
RUN yum -y install maven rpm-build
# creating the rpm
COPY pom.xml /root
COPY src /root/src
COPY LICENSE AUTHORS /root/
RUN cd /root; ls -l src; mvn package
############################################
# #
# EXEC PHASE #
# #
############################################
FROM centos:7
# package prerequisites
RUN yum -y update && yum -y install epel-release
# postgres config
RUN yum -y install yum -y install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm && yum -y install postgresql96-devel
# backend specific instructions
COPY --from=BUILDER /root/target/rpm/owb/RPMS/x86_64/owb-1.0.6-1.x86_64.rpm /root/
RUN yum -y install /root/owb-1.0.6-1.x86_64.rpm
EXPOSE 80
# entrypoint
COPY src/scripts/entrypoint.sh /
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/bin/bash", "/entrypoint.sh" ]