Skip to content

Commit

Permalink
fix(devnet): xc docker image user fix to run devent in docker (#4016)
Browse files Browse the repository at this point in the history
![image](https://github.com/ComposableFi/composable/assets/757125/1f288499-3285-438b-9499-68847851b52e)


Required for merge:
- [ ] `pr-workflow-check / draft-release-check` is ✅ success
- Other rules GitHub shows you, or can be read in
[configuration](../terraform/github.com/branches.tf)

Makes review faster:
- [x] PR title is my best effort to provide summary of changes and has
clear text to be part of release notes
- [ ] I marked PR by `misc` label if it should not be in release notes
- [x] Linked Zenhub/Github/Slack/etc reference if one exists
F1bonacc1/process-compose#84
- [ ] I was clear on what type of deployment required to release my
changes (node, runtime, contract, indexer, on chain operation, frontend,
infrastructure) if any in PR title or description
- [ ] Added reviewer into `Reviewers`
- [x] I tagged(`@`) or used other form of notification of one person who
I think can handle best review of this PR
- [ ] I have proved that PR has no general regressions of relevant
features and processes required to release into production
- [ ] Any dependency updates made, was done according guides from
relevant dependency
- Clicking all checkboxes 
- Adding detailed description of changes when it feels appropriate (for
example when PR is big)
  • Loading branch information
dzmitry-lahoda committed Aug 4, 2023
1 parent 632e717 commit 0f13113
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion flake/devnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

devnet-xc-image = devnetTools.buildDevnetImage {
name = "devnet-xc";
container-tools = devnetTools.withDevNetContainerTools;
container-tools = devnetTools.withDevNetContainerTools
++ [ pkgs.bash ];
devNet = self'.packages.devnet-xc-background;
};
};
Expand Down
12 changes: 11 additions & 1 deletion tools/devnet-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,20 @@
config = {
Entrypoint =
[ "${pkgs.lib.getBin devNet}/bin/${pkgs.lib.getName devNet}" ];
Env = [ "USER=actions-runner" ];
};

runAsRoot = ''
mkdir --parents /usr/bin /tmp/composable-devnet && chown 777 /tmp
#!${pkgs.runtimeShell}
${pkgs.dockerTools.shadowSetup}
# so we add 2 potential runners, CI and Codespace just for convenience
mkdir --parents /usr/bin /home/actions-runner /tmp/composable-devnet /home/vscode
chown 777 /tmp
chown 777 /tmp/composable-devnet
chown 777 /home/actions-runner
chown 777 /home/vscode
groupadd --system actions-runner
useradd --system --gid actions-runner --groups root actions-runner
'';
};
};
Expand Down

0 comments on commit 0f13113

Please sign in to comment.