particle-os-cli/template/templates/modules/copy
2025-01-31 22:29:31 -05:00
..
copy.j2 feat: Stages (#173) 2024-05-18 13:23:50 +00:00
copy.tsp fix: Improve validation errors 2025-01-31 22:29:31 -05:00
module.yml fix: add typespec schemas for cli modules, remove modules.json (not needed anymore) (#209) 2024-07-27 10:31:52 -04:00
README.md chore: Prepare for the v0.9.0 release 2024-12-03 03:49:37 -05:00

copy

:::caution Only compiler-based builds can use this module as it is built-in to the BlueBuild CLI tool. :::

The copy module is a short-hand method of adding a COPY instruction into the image. This can be used to copy files from images, other stages, or even from the build context.

Usage

The copy module's properties are a 1-1 match with the COPY instruction containing src, dest, and from (optional). The example below will COPY the file /usr/bin/yq from docker.io/mikefarah/yq into /usr/bin/.

modules:
- type: copy
  from: docker.io/mikefarah/yq
  src: /usr/bin/yq
  dest: /usr/bin/

Creating an instruction like:

COPY --linked --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/

Omitting from: will allow copying from the build context:

modules:
- type: copy
  src: file/to/copy.conf
  dest: /usr/etc/app/

Creating an instruction like:

COPY --linked file/to/copy.conf /usr/etc/app/