Skip to content

Commit c385b52

Browse files
committed
Allow to configure liberty version in the .env file.
1 parent 00cc86a commit c385b52

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ REPOSITORY=ibmcom
99

1010
# Image prefix
1111
PREFIXIMAGE=odm
12+
13+
# Liberty Version
14+
FROMLIBERTY=websphere-liberty:webProfile7

decisioncenter/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARG FROMLIBERTY
12
FROM maven:3.5.2-jdk-8-alpine AS builder
23
ARG ODMDOCKERDIR
34
ENV ODMDOCKERDIR $ODMDOCKERDIR
@@ -48,7 +49,7 @@ COPY ./executionserver/lib/jaxws /thirdpartylib
4849
# End Fix
4950
RUN $SCRIPT/loadFeatures.sh $SCRIPT
5051

51-
FROM websphere-liberty:webProfile7
52+
FROM ${FROMLIBERTY}
5253
ARG ODMDOCKERDIR
5354
ARG ODMVERSION
5455
LABEL maintainer="ODMDev [email protected], Laurent GRATEAU <[email protected]>"

decisionserver/decisionrunner/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARG FROMLIBERTY
12
FROM maven:3.5.2-jdk-8-alpine AS builder
23
ARG ODMDOCKERDIR
34
ENV ODMDOCKERDIR $ODMDOCKERDIR
@@ -32,7 +33,7 @@ RUN $SCRIPT/extractApp.sh DecisionRunner.war
3233
RUN $SCRIPT/changeParamValue.sh ForceDatabaseTableCreation false true $APPS/DecisionRunner.war/WEB-INF/web.xml
3334
RUN $SCRIPT/loadFeatures.sh $SCRIPT
3435

35-
FROM websphere-liberty:webProfile7
36+
FROM ${FROMLIBERTY}
3637
ARG ODMDOCKERDIR
3738
ARG ODMVERSION
3839
LABEL maintainer="ODMDev [email protected], Laurent GRATEAU <[email protected]>"

decisionserver/decisionserverconsole/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARG FROMLIBERTY
12
FROM maven:3.5.2-jdk-8-alpine AS builder
23
ARG ODMDOCKERDIR
34
ENV ODMDOCKERDIR $ODMDOCKERDIR
@@ -32,7 +33,7 @@ RUN $SCRIPT/changeParamValue.sh management.protocol jmx tcpip $APPS/res.war/WEB-
3233
RUN $SCRIPT/loadFeatures.sh $SCRIPT
3334

3435

35-
FROM websphere-liberty:webProfile7
36+
FROM ${FROMLIBERTY}
3637
ARG ODMDOCKERDIR
3738
ARG ODMVERSION
3839
LABEL maintainer="ODMDev [email protected], Laurent GRATEAU <[email protected]>"

decisionserver/decisionserverruntime/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ARG FROMLIBERTY=websphere-liberty:webProfile7
12
FROM maven:3.5.2-jdk-8-alpine AS builder
23
ARG ODMDOCKERDIR
34
ENV ODMDOCKERDIR $ODMDOCKERDIR
@@ -15,7 +16,7 @@ COPY $ODMDOCKERDIR/common/drivers /config/resources
1516

1617
# Use production liberty if needed
1718
COPY $ODMDOCKERDIR/resources/* /wlp-embeddable/
18-
RUN chmod a+x $SCRIPT/fixWLPForProduction.sh && sync && $SCRIPT/fixWLPForProduction.sh
19+
RUN echo "Use the liberty image : $FROMLIBERTY" && chmod a+x $SCRIPT/fixWLPForProduction.sh && sync && $SCRIPT/fixWLPForProduction.sh
1920
# Install missing require package in the alpine builder image
2021
RUN apk add --no-cache bash perl ca-certificates wget
2122
# Build welcome page
@@ -32,7 +33,7 @@ COPY ./executionserver/applicationservers/WLP855/DecisionService.war $APPS
3233

3334
RUN $SCRIPT/extractApp.sh DecisionService.war
3435

35-
FROM websphere-liberty:webProfile7
36+
FROM ${FROMLIBERTY}
3637
ARG ODMDOCKERDIR
3738
ARG ODMVERSION
3839
ARG DECISIONSERVERCONSOLE_NAME

docker-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '2'
1+
version: '3'
22
services:
33
dbserver:
44
image: $REPOSITORY/dbserver:$ODMVERSION
@@ -28,6 +28,7 @@ services:
2828
args:
2929
- ODMDOCKERDIR=$ODMDOCKERDIR
3030
- ODMVERSION=$ODMVERSION
31+
- FROMLIBERTY=$FROMLIBERTY
3132
links:
3233
- dbserver
3334
depends_on:
@@ -45,6 +46,7 @@ services:
4546
args:
4647
- ODMDOCKERDIR=$ODMDOCKERDIR
4748
- ODMVERSION=$ODMVERSION
49+
- FROMLIBERTY=$FROMLIBERTY
4850
links:
4951
- dbserver
5052
- odm-decisionserverconsole
@@ -63,6 +65,7 @@ services:
6365
args:
6466
- ODMDOCKERDIR=$ODMDOCKERDIR
6567
- ODMVERSION=$ODMVERSION
68+
- FROMLIBERTY=$FROMLIBERTY
6669
environment:
6770
- DECISIONSERVERCONSOLE_NAME=odm-decisionserverconsole
6871
links:
@@ -83,6 +86,7 @@ services:
8386
args:
8487
- ODMDOCKERDIR=$ODMDOCKERDIR
8588
- ODMVERSION=$ODMVERSION
89+
- FROMLIBERTY=$FROMLIBERTY
8690
links:
8791
- dbserver
8892
depends_on:

0 commit comments

Comments
 (0)