How am i able to use the tee command for multiple lines in docker?
FROM amazonlinux:2022
RUN mkdir -p /etc/profile.d
RUN tee /etc/profile.d/jdk.sh <<EOF \n\
export JAVA_HOME=/opt/jdk-17 \n\
export PATH=\$PATH:\$JAVA_HOME/bin \n\
EOF
When i build this i get:
The command '/bin/sh -c tee /etc/profile.d/jdk.sh <<EOF \nexport JAVA_HOME=/opt /jdk-17 \nexport PATH=\$PATH:\$JAVA_HOME/bin \nEOF' returned a non-zero code: 1