determine OS distribution of a docker image

The Filesystem Hierarchy Standard has a standard definition for /etc/os-release, which should be available on most distributions: The /etc/os-release and /usr/lib/os-release files contain operating system identification data. The basic file format of os-release is a newline-separated list of environment-like shell-compatible variable assignments. It is possible to source the configuration from shell scripts. This means you … Read more

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

tech