Pass args to the Dockerfile from docker-compose

the key word ARG has a different scope before and after the FROM instruction

Try using ARG twice in your Dockerfile, and/or you can try the ENV variables

ARG LANDING_PAGE_DOMAIN
FROM nginx:alpine

COPY nginx.conf /etc/nginx/nginx.conf
COPY production/* /etc/nginx/conf.d/

ARG LANDING_PAGE_DOMAIN
ENV LANDING_PAGE_DOMAIN=${LANDING_PAGE_DOMAIN}

RUN sed -i s/{LANDING_PAGE_DOMAIN}/${LANDING_PAGE_DOMAIN}/g /etc/nginx/conf.d/landing.conf

EXPOSE 80 443

Leave a Comment

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