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

Update Quickstart Docs #440

Merged
merged 10 commits into from
Nov 27, 2024
185 changes: 0 additions & 185 deletions website/docs/build-source.md

This file was deleted.

4 changes: 2 additions & 2 deletions website/docs/build.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Building with Dalec
title: Building Packages and Containers with Dalec - An Overview
Copy link
Member

@sozercan sozercan Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a bit long for the sidebar, maybe just "Overview"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamperlin did you push your changes, i am still seeing the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are now pushed!

---

In this section, we'll go over how to build packages and containers with Dalec.
Expand All @@ -16,7 +16,7 @@ For more information on the Dalec spec, see the [Dalec Specification](spec.md).

Dalec can build packages and containers from source code repositories. This is done by specifying the source code repository and the build steps in the Dalec spec. The source code is checked out, built, and the resulting artifacts are included in the package.

For more information on building from source, see [Building from source](build-source.md).
For an intro guide to building from source code repos, see [Quickstart](quickstart.md).

## Virtual Packages

Expand Down
29 changes: 29 additions & 0 deletions website/docs/container-only-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Container-only builds
---

# Container-only builds
adamperlin marked this conversation as resolved.
Show resolved Hide resolved

It is possible to use Dalec when you wish to build a minimal image from scratch or based on one of Dalec's supported distros (see [Targets](targets.md) for a list of these) with only certain packages installed. To do this, simply define a Dalec spec with only runtime dependencies specified. The resulting image will contain only the specified packages and their dependencies.

```yaml
name: my-minimal-image
version: 0.1.0
description: A minimal distroless image with only curl and shell access
revision: 1

dependencies:
runtime:
curl:
bash:

image:
entrypoint: /bin/bash

```

Then, to build:
`docker build -f my-minimal-image.yml --target=mariner2 -t my-minimal-image:0.1.0 .`
adamperlin marked this conversation as resolved.
Show resolved Hide resolved

This will produce a minimal image from `scratch` with only curl and bash installed.
adamperlin marked this conversation as resolved.
Show resolved Hide resolved
How does this work? Dalec will create a [Virtual Package](virtual-packages.md) which has only the specified runtime dependencies and install this in the target base image. This is where the `--target=mariner2` flag comes in. Even though the resulting image is from scratch, it will have the specified packages installed from mariner2 repos.
2 changes: 1 addition & 1 deletion website/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Our goal is to provide a secure and reproducible way to build packages and conta
- ✍️ Support for signed packages
- 🔐 Ensure supply chain security with build time SBOMs, and Provenance attestations

👉 To get started with building packages and containers, please see [Building with Dalec](build.md)!
👉 To get started with building packages and containers, please see [Quickstart](quickstart.md)!
Loading