Skip to content

Commit 577f5ae

Browse files
silverusermmoqui
silveruser
authored andcommitted
Update Dockerfile for Silverpeas 6.1
Fix for 6.1 the misname of a migration SQL script
1 parent 495085f commit 577f5ae

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
6666
ENV SILVERPEAS_HOME /opt/silverpeas
6767
ENV JBOSS_HOME /opt/wildfly
6868

69-
ARG SILVERPEAS_VERSION=6.1-build200607
69+
ARG SILVERPEAS_VERSION=6.1
7070
ARG WILDFLY_VERSION=18.0.1
7171
LABEL name="Silverpeas 6" description="An all-to-one image to run Silverpeas 6 for testing purpose" vendor="Silverpeas" version=${SILVERPEAS_VERSION} build=1
7272

@@ -101,11 +101,10 @@ WORKDIR ${SILVERPEAS_HOME}/bin
101101

102102
# Copy this container init script that will be run each time the container is ran
103103
COPY src/run.sh /opt/
104+
COPY src/setup.sh ${SILVERPEAS_HOME}/bin
104105

105106
# Assemble Silverpeas
106-
RUN ./silverpeas clean install \
107-
&& rm ../log/build-* \
108-
&& touch .install
107+
RUN ./setup.sh ${SILVERPEAS_VERSION}
109108

110109
#
111110
# Expose image entries. By default, when running, the container will set up Silverpeas and Wildfly

src/setup.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
echo "Installation of Silverpeas $1"
4+
if [ "$1" = "6.1" ]; then
5+
# it is a workaround to a misnamed SQL migration script for H2
6+
./silverpeas clean assemble
7+
mv ../migrations/db/h2/busCore/up040/alter-table.sql ../migrations/db/h2/busCore/up040/alter_table.sql
8+
./silverpeas install
9+
else
10+
./silverpeas clean install
11+
fi
12+
ret=$?
13+
if [ $ret -eq 0 ]; then
14+
rm ../log/build-*
15+
touch .install
16+
else
17+
echo "An error has occurred :-("
18+
echo
19+
for f in ../log/build-*; do
20+
cat "$f"
21+
done
22+
fi
23+
exit $ret

0 commit comments

Comments
 (0)