How to make a build arg mandatory during Docker build?

I tested with RUN test -n <ARGvariablename> what @konradstrack mentioned in the original (edit) post… that seems do the job of mandating the variable to be passed as the build time argument for the docker build command:

FROM ubuntu

ARG MY_VARIABLE
RUN test -n "$MY_VARIABLE"
ENV MY_VARIABLE $MY_VARIABLE

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)