Jekyll build from DOCKERFILE problem, language gen not working properly

I have a shell script with a jekyll build followed by a maven package that works fine from a cmd shell window, but when it’s invoked from within a DOCKERFILE the jekyll polyglot support only generates web pages for 2 of the 9 languages (it randomly gens files for 2 languages each build) specified in _config.yml.

I’ve been tweaking the dockerfile but really cannot get underneath why the scripting works differently from docker.

script contains:

# Jekyll build

echo "Building with jekyll..."

echo `jekyll -version`


mkdir -p "$TARGET_DIR"/jekyll-webapp

bundle exec jekyll build $JEKYLL_BUILD_FLAGS --source "$CONTENT_DIR" --destination "$TARGET_DIR"/jekyll-webapp

# Maven packaging

#echo "Running maven (mvn)..."

mvn -B package

Dockerfile contains:

RUN bash ./scripts/build_jekyll_maven.sh \
    && cd /app/target/liberty/wlp/usr/servers/defaultServer/apps/ \
    && mkdir myapp \
    && unzip /app/target/myapp.war -d myapp \
    && rm myapp.war \
    && mv myapp myapp.war

_config.yml

languages: ["es", "de", "fr", "it", "ja", "pt-BR", "zh-CN", "zh-TW"]
default_lang: "en"

pom.xml for maven plugin

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.2.3</version>
                <configuration>
                    <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>mywebapp</warName>
                    <warSourceDirectory>target/jekyll-webapp</warSourceDirectory>
                    <webResources>
                        <resource>
                            <!-- this is relative to the pom.xml directory -->
                            <directory>target/jekyll-webapp</directory>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

Does your Dockerfile copy the config to the image?

Otherwise you can mount the current directory in the container

Strangely this only happens on my workstation, not on my colleagues, so I’m going to close this out for now. Thanks Michael