Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build from local storage #207

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/backend/src/build-disk-image.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ test('check image builder options', async () => {
expect(options.HostConfig).toBeDefined();
if (options.HostConfig?.Binds) {
expect(options.HostConfig.Binds[0]).toEqual(outputFolder + ':/output/');
expect(options.HostConfig.Binds[1]).toEqual('/var/lib/containers/storage:/var/lib/containers/storage');
}
expect(options.Cmd).toEqual([image, '--type', type, '--target-arch', arch, '--output', '/output/']);
expect(options.Cmd).toEqual([image, '--type', type, '--target-arch', arch, '--output', '/output/', '--local']);
});

test('check we pick unused container name', async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/build-disk-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export function createBuilderImageOptions(
HostConfig: {
Privileged: true,
SecurityOpt: ['label=type:unconfined_t'],
Binds: [folder + ':/output/'],
Binds: [folder + ':/output/', '/var/lib/containers/storage:/var/lib/containers/storage'],
},

// Add the appropriate labels for it to appear correctly in the Podman Desktop UI.
Expand All @@ -344,7 +344,7 @@ export function createBuilderImageOptions(
'bootc.build.image.location': imagePath,
'bootc.build.type': type,
},
Cmd: [image, '--type', type, '--target-arch', arch, '--output', '/output/'],
Cmd: [image, '--type', type, '--target-arch', arch, '--output', '/output/', '--local'],
};

return options;
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@

// Image related
export const bootcImageBuilderContainerName = '-bootc-image-builder';
export const bootcImageBuilderName = 'quay.io/centos-bootc/bootc-image-builder:latest-1708009307';
export const bootcImageBuilderName = 'quay.io/centos-bootc/bootc-image-builder:latest-1710916056';
4 changes: 0 additions & 4 deletions packages/frontend/src/Build.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,6 @@ $: {
>.
</p>
{/if}
<p class="text-gray-300 text-xs pt-1">
Note: All images must be pushed to a publically accessible registry in order for our build system to
"pull" the images. This is TEMPORARY and local image building will be supported in the future.
</p>
</div>
<div>
<label for="path" class="block mb-2 text-sm font-bold text-gray-400">Build output folder</label>
Expand Down