blob: 304a00a24605718b27f28a14d3dd58b529e9e053 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# 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
|