From 9cd86cfe4ec36ebfa1883f6d949bf31f878509d7 Mon Sep 17 00:00:00 2001 From: Erlend Oftedal Date: Tue, 16 Jan 2024 12:47:54 +0100 Subject: [PATCH] Support cross mounting --- README.md | 16 +++--- src/cli.ts | 12 ++++- src/registry.ts | 110 ++++++++++++++++++++++++++++++++++------ src/types.ts | 1 + tests/localtest/test.sh | 2 +- 5 files changed, 115 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 58d0df6..d4fce9e 100644 --- a/README.md +++ b/README.md @@ -51,27 +51,29 @@ Options: --toImage Required: Image name of target image - [path/]image:tag --folder Required: Base folder of node application (contains package.json) --file Optional: Name of configuration file (defaults to containerify.json if found on path) + --doCrossMount Cross mount image layers from the base image (only works if fromImage and toImage are in the same registry) (default: false) --fromRegistry Optional: URL of registry to pull base image from - Default: https://registry-1.docker.io/v2/ --fromToken Optional: Authentication token for from registry --toRegistry Optional: URL of registry to push base image to - Default: https://registry-1.docker.io/v2/ - --optimisticToRegistryCheck Optional: Treat redirects as layer existing in remote registry. Potentially unsafe, but could save bandwidth. + --optimisticToRegistryCheck Treat redirects as layer existing in remote registry. Potentially unsafe, but can save bandwidth. --toToken Optional: Authentication token for target registry --toTar Optional: Export to tar file + --toDocker Optional: Export to local docker registry --registry Optional: Convenience argument for setting both from and to registry --platform Optional: Preferred platform, e.g. linux/amd64 or arm64 --token Optional: Convenience argument for setting token for both from and to registry - --user Optional: User account to run process in container - default: 1000 - --workdir Optional: Workdir where node app will be added and run from - default: /app - --entrypoint Optional: Entrypoint when starting container - default: npm start + --user Optional: User account to run process in container - default: 1000 (empty for customContent) + --workdir Optional: Workdir where node app will be added and run from - default: /app (empty for customContent) + --entrypoint Optional: Entrypoint when starting container - default: npm start (empty for customContent) --labels Optional: Comma-separated list of key value pairs to use as labels --label