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 documentation to accommodate cross-compilation #7

Merged
merged 1 commit into from
Aug 18, 2024

Conversation

rucoder
Copy link
Contributor

@rucoder rucoder commented Aug 18, 2024

No description provided.

@rucoder rucoder requested a review from deitch August 18, 2024 12:08
@rucoder
Copy link
Contributor Author

rucoder commented Aug 18, 2024

@deitch I'm not sure where sbom.spdx.json must be located. In your example Dockerfile it is located in /src/foo

# build as before
ADD https://github.com/foo/bar.git#v1.2.3 /src/foo
WORKDIR /src/foo
RUN cargo build --release
RUN cargo sbom > sbom.spdx.json

is this correct?

@deitch
Copy link
Contributor

deitch commented Aug 18, 2024

In your example Dockerfile it is located in /src/foo

No, not there. It needs to be anywhere in the output image. So if we copy things from /out/foo to the final image, then it should be in /out somewhere. Preferably similar location to actual binary.

Copy link
Contributor

@deitch deitch left a comment

Choose a reason for hiding this comment

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

Some simplification

README.md Show resolved Hide resolved
README.md Outdated

## Usage

Use this image as a base `FROM` when building in your EVE Dockerfile. For example:

```Dockerfile
FROM lfedge/eve-rust:1.80.1 AS rust
# we use host tools to avoid emulation and slow builds
Copy link
Contributor

Choose a reason for hiding this comment

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

While this all is correct, it also is confusing, while the original example is straightforward to understand. Can we leave the original example, and then add a section for cross-compilation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While this all is correct, it also is confusing, while the original example is straightforward to understand. Can we leave the original example, and then add a section for cross-compilation?

ok, I'll create a separate example

@rucoder
Copy link
Contributor Author

rucoder commented Aug 18, 2024

In your example Dockerfile it is located in /src/foo

No, not there. It needs to be anywhere in the output image. So if we copy things from /out/foo to the final image, then it should be in /out somewhere. Preferably similar location to actual binary.

ok, my question was about "where it must be located so LK will find it" , I assumed it must be in the / but it seems it doesn't matter

Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
@deitch deitch merged commit e3bbfee into lf-edge:main Aug 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants