# Jekyll build from DOCKERFILE problem, language gen not working properly

**URL:** <https://talk.jekyllrb.com/t/jekyll-build-from-dockerfile-problem-language-gen-not-working-properly/5328>\
**Category:** Help\
**Created:** [December 7, 2020, 10:06pm UTC](https://talk.jekyllrb.com/t/jekyll-build-from-dockerfile-problem-language-gen-not-working-properly/5328 "2020-12-07T22:06:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davco01](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/davco01/32/3023_2.png) [@davco01](https://talk.jekyllrb.com/u/davco01)\
**Post date:** [December 7, 2020, 10:06pm UTC](https://talk.jekyllrb.com/t/jekyll-build-from-dockerfile-problem-language-gen-not-working-properly/5328/1 "2020-12-07T22:06:52Z")

</div>

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:

```auto
# 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:

```auto
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

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

```

pom.xml for maven plugin

```auto
<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>

```

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [December 8, 2020, 8:10am UTC](https://talk.jekyllrb.com/t/jekyll-build-from-dockerfile-problem-language-gen-not-working-properly/5328/2 "2020-12-08T08:10:19Z")

</div>

Does your Dockerfile copy the config to the image?

Otherwise you can mount the current directory in the container

---

<div class="post-metadata">

**Author:** ![davco01](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/davco01/32/3023_2.png) [@davco01](https://talk.jekyllrb.com/u/davco01)\
**Post date:** [December 11, 2020, 1:19am UTC](https://talk.jekyllrb.com/t/jekyll-build-from-dockerfile-problem-language-gen-not-working-properly/5328/3 "2020-12-11T01:19:45Z")

</div>

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