Occasionally, there can be an issue with our default Linux container, e.g., if you try to run it on a very old host OS or if you try to run it on ARM-based macOS.

For this reason, it can be helpful to use a more portable JVM-based version.

📁 The dockerfile 🔗

There's a simple way how to create a JVM-based Docker container that works in a way compatible with the Linux-based one:

FROM adoptopenjdk/openjdk11:alpine-jre

RUN apk add wget unzip && \
    rm -rf /var/cache/apk/* && \
    wget https://dist.localazy.com/java/java-v1.7.3.zip && \
    unzip java-v1.7.3.zip && \
    cp localazy.jar /bin/localazy.jar && \
    echo "#!/bin/sh" > /bin/localazy && \
    echo "java -jar /bin/localazy.jar \$@" >> /bin/localazy && \
    chmod a+x /bin/localazy
    
WORKDIR /localazy

Note: The script above uses hardcoded version 1.7.3, but feel free to use any other suitable for your needs.

Just build it:
docker build . -t my_jvm_cli

and run it:
docker --rm -v $(pwd):/localazy my_jvm_cli localazy upload

✔️ Conclusion 🔗

Remember that Localazy CLI is among the most flexible developer tools in the localization field. Learn how to utilize the Localazy CLI to its full potential in the ultimate guide How to use Localazy CLI to streamline your localization workflow