skip to Main Content

Docker conditional processing

I cannot get conditional Dockerfile to work. My command is: docker build -t test --progress=plain --build-arg APP_BRANCH=main. FROM alpine:latest AS base ARG APP_BRANCH I've tried using simple if...else: RUN if [ "${APP_BRANCH}" == "main" ]; then echo "MAIN app"; elif…

VIEW QUESTION
Back To Top
Search