Skip to content

Instantly share code, notes, and snippets.

@picpromusic
Last active April 5, 2020 13:38
Show Gist options
  • Save picpromusic/8e00d1e9fb64b149c8ae11c34794217e to your computer and use it in GitHub Desktop.
Save picpromusic/8e00d1e9fb64b149c8ae11c34794217e to your computer and use it in GitHub Desktop.
#docker build -t my/sapmachine-github-issue-615 .
#docker run -it my/sapmachine-github-issue-615
FROM sapmachine:11.0.6
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales vim
RUN sed -i -e 's/# fr_CH.UTF-8 UTF-8/fr_CH.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=fr_CH.UTF-8
ENV LC_ALL fr_CH.UTF-8
ENV LANG fr_CH.UTF-8
ENV LANGUAGE fr_CH.UTF-8
RUN echo 'import java.text.NumberFormat;\n\
import java.util.Locale;\n\
\n\
public class Test {\n\
public static void main(String args[]) {\n\
Double value = 1000000.4;\n\
NumberFormat format = NumberFormat.getInstance(new Locale("fr", "CH"));\n\
format.setMinimumFractionDigits(2);\n\
System.out.println(format.format(value));\n\
}\n\
}' > /tmp/Test.java && \
javac /tmp/Test.java
ENTRYPOINT \
echo '==> export'&& \
export && \
echo && \
echo '==> java --version' && \
java --version && \
echo && \
echo '==> java -cp /tmp Test' && \
java -cp /tmp Test && \
echo && \
echo '==> java -cp /tmp -Djava.locale.providers=COMPAT,CLDR Test' && \
java -cp /tmp -Djava.locale.providers=COMPAT,CLDR Test && \
echo && \
/bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment