# syntax=docker/dockerfile:latest ARG BASE_IMAGE=alpine ARG LINUX_DISTRO=alpine % if [[ "$BASE_IMAGE_COPY" ]]; then FROM <% $LINUX_DISTRO %> COPY --from=<% $BASE_IMAGE %> / / % else FROM $BASE_IMAGE % fi # repeat these so they are available for rest of dockerfile ARG BASE_IMAGE ARG LINUX_DISTRO # ARG VERBOSE ARG REBUILD WORKDIR /build # put /opt/bin in path permently ENV PATH="/opt/bin:${PATH}" # CORE RUN --mount=type=bind,source=./core,target=/build \ < % fi # default command ENTRYPOINT ["/opt/bin/entrypoint"] # default WORKDIR <% ${WORKDIR:-/opt} %>