-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ed8663
commit 0759f8a
Showing
6 changed files
with
48 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.venv | ||
result | ||
*.Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Nix Flake actions | ||
name: CI tasks from Nix config | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# simple hack to build the same image on OSX. otherwise the Nix docker build will by default not cross compile to linux | ||
# in CI or on linux systems - use `nix build .#image | docker load -i result` instead | ||
|
||
FROM nixos/nix AS builder | ||
RUN set -xe; \ | ||
echo 'sandbox = true' >> /etc/nix/nix.conf; \ | ||
echo 'filter-syscalls = false' >> /etc/nix/nix.conf; \ | ||
echo 'max-jobs = auto' >> /etc/nix/nix.conf; \ | ||
echo 'experimental-features = nix-command flakes' >> /etc/nix/nix.conf | ||
|
||
WORKDIR /build | ||
COPY flake.lock *.nix . | ||
|
||
RUN nix flake show | ||
|
||
|
||
COPY . . | ||
|
||
RUN nix build .#image | ||
RUN mkdir -p /output; mkdir -p /img | ||
# very simplistic way to unpack image - relies only on there being a single layer | ||
RUN tar -xf result --strip-components=1 -C /img | ||
RUN tar -xf /img/layer.tar -C /output | ||
|
||
FROM scratch AS final | ||
COPY --from=builder /output/ / | ||
|
||
ENTRYPOINT ["/bin/ddapm-test-agent"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters