# vim: ft=snippets: snippet skel "skeleton" b #syntax=docker/dockerfile:1-experimental FROM docker.io/library/alpine:3${1} $0 #vim: ft=Dockerfile: endsnippet snippet from:buildpl "FROM --platform=$BUILDPLATFORM" FROM --platform=$BUILDPLATFORM docker.io/library/alpine:3${1} AS base ARG TARGETPLATFORM RUN apk -U add --no-cache $0 endsnippet snippet from:final "FROM scratch AS final" FROM scratch AS final COPY --from=build /out/* / endsnippet snippet run "RUN" b RUN --mount=type=bind,target=. \ --mount=type=cache,target=/root/.cache \ ${0} endsnippet snippet xx "tonistiigi/xx" b FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx:${1:golang} AS xx ${0}COPY --from=xx / / endsnippet