I want to use the same Dockerfile for Windows and Linux containers. It uses build arguments top define the base image like:
FROM $SDK_REPO:$SDK_VERSION AS build-env
It also defines a argument called $PLATFORM which is either linux or windows.
Now I want to install a package only when the image is build for linux. I tried to use an if switch like:
RUN if [ $PLATFORM = linux ]; then apt-get update && apt-get install -y <mypackage>; fi
Obviously, this doesn't work on windows because its using bash syntax.
Is it somehow possible to use the same dockerfile both for windows and linux containers and to do an apt-get install only when my platform argument is linux?