mirror of https://github.com/docker/docs.git
chore: add vendor target for bake
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
2d8290fa5e
commit
9543cd0db5
11
Dockerfile
11
Dockerfile
|
@ -39,3 +39,14 @@ WORKDIR /test
|
|||
COPY --from=build /out ./public
|
||||
ADD .htmltest.yml .htmltest.yml
|
||||
RUN htmltest
|
||||
|
||||
FROM build-base as update-modules
|
||||
ARG MODULE="-u"
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN hugo mod get ${MODULE}
|
||||
RUN hugo mod vendor
|
||||
|
||||
FROM scratch as vendor
|
||||
COPY --from=update-modules /src/_vendor /_vendor
|
||||
COPY --from=update-modules /src/go.* /
|
||||
|
|
|
@ -140,3 +140,11 @@ target "aws-cloudfront-update" {
|
|||
no-cache-filter = ["aws-cloudfront-update"]
|
||||
output = ["type=cacheonly"]
|
||||
}
|
||||
|
||||
target "vendor" {
|
||||
target = "vendor"
|
||||
args = {
|
||||
MODULE = null
|
||||
}
|
||||
output = ["."]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue