Quantcast
Channel: Active questions tagged dockerfile - DevOps Stack Exchange
Viewing all articles
Browse latest Browse all 136

How can I get the Docker target platform inside the Build Environment / Dockerfile

$
0
0

I'm doing multi-platform builds with buildx and would like to know if there is a way to determine what platform is currently being build so I can avoid certain steps for certain environments.

For example, something like...

# No DOSEMU outside amd64RUN if [ "$DOCKER_PLATFORM" = "amd64" ]; then \      apt install dosemu \    fi

Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>