You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: custom-assembly/readme.md
+34-9Lines changed: 34 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,6 @@ This is meant to be a straightforward example of CA using the console.
34
34
2. Select the org (if you have multiple) to use, this demo uses the cs-ttt-demo.dev Chainguard org.
35
35
3. Select Organization Images tab
36
36
4. Select the `custom-python-ui-demo` image
37
-
38
-
**Note:**If the image is CA enabled, you will see the "Customize Image" button on the top right of the screen. If CA has been enabled globally you should see this for all images.
39
-
40
37
5. (Optional) Prior to customizing the image try to run curl:
41
38
42
39
From your terminal run:
@@ -52,11 +49,19 @@ This is meant to be a straightforward example of CA using the console.
52
49
The list that appears contains all of the entitled packages that can be added to the image, i.e. these are all the packages the org is entitled to.
53
50
54
51
7. Select package(s) to add to the image e.g. `curl`.
55
-
8. Select "Preview Changes"
52
+
8. Select "Continue"
53
+
9. Choose if you would like you create a new image or customize the current image.
54
+
55
+
If you select `Customize the current image`, the curl package will be included in your "custom-python-ui-demo" image in every tag. Use this option when you know for certain that you would like `curl` to always be included in your image and there will be no need for any other variants. If you add specific versions of a package it may break certain tag builds.
56
+
57
+
If you select `Create a new image`, a duplicate image repo will be created, based on the original, but with the new packaged added. Use this option when users may still need to use the original image without customization, but you are seeking to provide an image that also has additional packages.
58
+
59
+
For this excercise, select `Customize the current image`.
60
+
10. Select "Preview changes"
56
61
57
62
This view highlights of the changes to be made, and note the warnings that are display about CA images.
58
63
59
-
9. Select "Apply Changes"
64
+
9. Select "Create"
60
65
10. Select "Go to Builds"
61
66
62
67
This will take the user to the builds page, you may need to hit the "Refresh" button a few times in order to see the status of the build (it can take a bit for the builds to show up on the builds page).
@@ -67,15 +72,15 @@ This is meant to be a straightforward example of CA using the console.
67
72
68
73
When the build is completed (successful or failed) you can select one of the rows and display the logs.
69
74
70
-
If a build fails due to a transient infrastructure issue they will be retried. If a build fails due to something else, for example a package not being available for a specific architecture (e.g. arm64 or x86_64), you can say they should reach out to your CS team, or open a support ticket.
75
+
If a build fails due to a transient infrastructure issue they will be retried. If a build fails due to something else, for example a package not being available for a specific architecture (e.g. arm64 or x86_64), reach out to your CS team or open a support ticket.
71
76
72
77
After the build has completed navigate to the "SBOM" tab of the page.
73
78
74
79
11. Select the "SBOM" tab
75
80
76
81
Show that the packages added now show up in the SBOM. If you search for `curl` you should see it along with the dependency `libcurl-openssl4` that was also installed as part of adding curl to the image.
77
82
78
-
12. (Optional) Run the custom image to verify curl has been installed:
83
+
12. (Optional) Run the custom image to verify curl has been installed. Keep in mind that if you selected `Create a new image` that you will need to use that image name.
79
84
80
85
```
81
86
docker run --pull=always --rm --entrypoint curl cgr.dev/cs-ttt-demo.dev/custom-python-ui-demo:latest -v https://chainguard.dev
@@ -145,7 +150,7 @@ In this example we will walk through converting a Dockerfile which is currently
145
150
146
151
4. Create Builder Custom YAML File
147
152
148
-
Now we will utilize Custom Assemble to replicate this docker build. We will use two CA images in this example, one for the buildtime dependencies and another for the final runtime image.
153
+
Now we will utilize Custom Assembly to replicate this docker build. We will use two CA images in this example, one for the buildtime dependencies and another for the final runtime image.
149
154
150
155
The first step is to create a yaml file defining the packages we want to install on the custom images.
151
156
@@ -162,7 +167,16 @@ In this example we will walk through converting a Dockerfile which is currently
162
167
163
168
5. Use chainctl to apply the customizations to the builder image
164
169
165
-
Use chainctl to apply the changes to the `custom-python-chainctl-demo-dev` custom image. Note: the --parent parameter may be changed if you are using a different Chainguard org and the --repo parameter may be changed if you are using a different CA image. Here we use the --yes flag to auto confirm the changes.
170
+
Use chainctl to apply the changes to the `custom-python-chainctl-demo-dev` custom image. Here we will utilize some command switches that are documented [here](https://edu.chainguard.dev/chainguard/chainctl/chainctl-docs/chainctl_images_repos_build_apply/)
171
+
172
+
```
173
+
--parent string The name or id of the parent location to apply build config.
174
+
--repo string The name or id of the repo to apply build config.
175
+
--save-as string Create a new repo with the edited configuration instead of updating the existing one.
176
+
-y, --yes Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively.
177
+
```
178
+
179
+
Note: the --parent parameter may be changed if you are using a different Chainguard org. Here we use the --yes flag to auto confirm the changes. Remember that changes to an existing image will affect every tag. This may break the functionality of other tags depending on how your organization uses tags.
166
180
167
181
```
168
182
ORGANIZATION="cs-ttt-demo.dev"
@@ -171,6 +185,17 @@ In this example we will walk through converting a Dockerfile which is currently
Note: if you want to save this image as a different name, similar to the `Create a new image` option on the web, use the --save-as parameter in addtion to the --repo paremeter. The --repo parameter specifies the source repo you are creating the image from.
0 commit comments