mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Merge branch 'feature/REPO-3057-search-engine-trial-image' into 'develop'
REPO-3057 Trials: Search Engine Image See merge request !23
This commit is contained in:
@@ -6,11 +6,14 @@ set -e
|
||||
# set current working directory to the directory of the script
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Unzip the package
|
||||
unzip target/alfresco-search-services-$bamboo_maven_version.zip -d target/docker-resources
|
||||
|
||||
nicebranch=`echo "$bamboo_planRepository_1_branch" | sed 's/\//_/'`
|
||||
dockerImage="docker-internal.alfresco.com/search-services:$bamboo_maven_version"
|
||||
dockerImage="quay.io/alfresco/search-services:$bamboo_maven_version"
|
||||
echo "Building $dockerImage from $nicebranch using version $bamboo_maven_version"
|
||||
|
||||
docker build --build-arg solrBranch=$nicebranch --build-arg solrVer=$bamboo_maven_version -t $dockerImage src/docker
|
||||
docker build -t $dockerImage target/docker-resources
|
||||
|
||||
echo "Running tests"
|
||||
docker run --rm "$dockerImage" [ -d /opt/alfresco-search-services/solr ] || (echo "solr dir does not exist" && exit 1)
|
||||
|
||||
@@ -217,6 +217,27 @@
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<phase>validate</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${basedir}/target/docker-resources</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/docker</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -1,23 +1,17 @@
|
||||
# Alfresco Solr Docker image
|
||||
FROM openjdk:8u111-jdk-alpine
|
||||
FROM quay.io/alfresco/alfresco-base-java:0.1.0
|
||||
MAINTAINER Gethin James, gethin.james@alfresco.com
|
||||
|
||||
ARG solrUrl
|
||||
ARG solrBranch
|
||||
ARG solrVer
|
||||
ENV SOLR_URL ${solrUrl:-https://nightlybuilds.alfresco.com/SearchServices/$solrBranch/LATEST/Distribution/alfresco-search-services-$solrVer.zip}
|
||||
ENV SOLR_ZIP alfresco-search-services.zip
|
||||
ENV DIST_DIR /opt/alfresco-search-services
|
||||
ENV LANG C.UTF-8
|
||||
ENV OPENSSL_VERSION 1.0.2k-8.el7
|
||||
|
||||
RUN addgroup solr && adduser -s /bin/bash -D -G solr solr
|
||||
COPY alfresco-search-services $DIST_DIR
|
||||
|
||||
RUN groupadd solr && useradd -s /bin/bash -g solr solr
|
||||
RUN set -x \
|
||||
&& apk add --no-cache --virtual .fetch-deps \
|
||||
ca-certificates \
|
||||
vim unzip lsof \
|
||||
bash openssl wget \
|
||||
&& wget --no-check-certificate -O "$SOLR_ZIP" "$SOLR_URL" \
|
||||
&& unzip "$SOLR_ZIP" -d /opt/ && rm "$SOLR_ZIP"\
|
||||
&& yum install -y lsof ca-certificates openssl-$OPENSSL_VERSION \
|
||||
&& yum clean all \
|
||||
&& mkdir -p $DIST_DIR/data \
|
||||
&& mv $DIST_DIR/solrhome/alfrescoModels $DIST_DIR/data/ \
|
||||
&& chown -R solr:solr $DIST_DIR \
|
||||
|
||||
Reference in New Issue
Block a user