Docker-Container Console Encoding in IntelliJ

Viewed 426

my Problem is the follows:

I'm trying to achive, that the Console ion IntelliJ for Docker-Container uses the Right Encoding. Right now it looks as follows: INtelliJ Output

While in Docker itself it looks like this: Docker Output

If i run a simple main in IntelliJ the Output is follows: main in IntelliJ

i changed every Option i found in IntelliJ to UTF-8, still nothing changed. Its just weird, that it does work in Docker and normal console, just not the Docker-Console in IntelliJ. Dockerfile is like this:

FROM fabric8/java-alpine-openjdk11-jre:latest

ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV AB_ENABLED=jmx_exporter
#ENV JAVA_TOOL_OPTIONS = "-Dfile.encoding=UTF8"

# Be prepared for running in OpenShift too
RUN adduser -G root --no-create-home --disabled-password 1001 \
  && chown -R 1001 /deployments \
  && chmod -R "g+rwX" /deployments \
  && chown -R 1001:root /deployments

COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/app.jar
EXPOSE 8080

# run with user 1001
USER 1001

ENTRYPOINT [ "/deployments/run-java.sh" ]

The commented out Line was one of my Attempts of fixing it, also adding the Option to the JAVA_OPTIONS. Didnt help (even without the Options added "file.encoding" returns UTF-8). And since it works perfectly in Docker, i dont think the Problem is in the File.

What else can i try?

1 Answers

IntelliJ IDEA -> Help -> Edit Custom VM Options and add line: -Dfile.encoding=UTF-8

Related