How can I set an ENV var in my Dockerfile based on the hostname? I tried this:
RUN if [
hostname
= “foo” ]; then ENV BAR “BAZ”; else ENV BAR “BIFF”; fi
But that failed with
ENV: not found
Share and learn in the Docker community.
How can I set an ENV var in my Dockerfile based on the hostname? I tried this:
RUN if [
hostname
= “foo” ]; then ENV BAR “BAZ”; else ENV BAR “BIFF”; fi
But that failed with
ENV: not found