diff --git a/.vscode/settings.json b/.vscode/settings.json index 12a8a85..1e2721b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true diff --git a/README.md b/README.md index e38bda2..d4fce9e 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,17 @@ containerify --fromImage nginx:alpine --folder . --toImage frontend:latest --cus This will take the `nginx:alpine` image, and copy the files from `./dist/` into `/usr/share/nginx/html`. +### Using with Github Container Registry (ghcr.io) + +1. Create a token from https://github.com/settings/tokens/new?scopes=write:packages or use GITHUB_TOKEN from Github Actions +2. Example: `containerify --registry https://ghcr.io/v2/ --token "$GITHUB_TOKEN" --fromImage docker-mirror/node:alpine --toImage : --folder . ` + +### Using with AWS ECR + +1. Create the repository in AWS from the console or through using the CLI +2. Create token using `aws ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken'` +3. Example: `containerify --toToken "Basic $TOKEN" --toRegistry https://.dkr.ecr..amazonaws.com/v2/ --fromImage node:alpine --toImage : --folder .` + ### Command line options ``` @@ -40,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