Commit 5b4d777
committed
feat: add GitLab Runner entrypoint and non-root user support
Add entrypoint script as Nix derivation using pkgs.writeShellScript:
- Handles custom CA certificate injection for Nix containers
- Combines custom CA with system cacert bundle
- Sets SSL_CERT_FILE and NIX_SSL_CERT_FILE environment variables
- Creates /etc/gitlab-runner directory
- Launches gitlab-runner with all passed arguments
Configure container to run as non-root user:
- Set User to gitlab-runner:gitlab-runner (UID/GID 999)
- Create /etc/passwd and /etc/group files
- Create necessary directories (/etc/gitlab-runner, /home/gitlab-runner, /tmp)
- Set world-writable permissions on /tmp1 parent e59b3b4 commit 5b4d777
1 file changed
Lines changed: 58 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
37 | 75 | | |
38 | 76 | | |
39 | 77 | | |
| |||
91 | 129 | | |
92 | 130 | | |
93 | 131 | | |
94 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
95 | 135 | | |
96 | 136 | | |
97 | 137 | | |
| 138 | + | |
98 | 139 | | |
99 | 140 | | |
100 | 141 | | |
| |||
104 | 145 | | |
105 | 146 | | |
106 | 147 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
110 | 155 | | |
111 | 156 | | |
112 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
113 | 166 | | |
114 | 167 | | |
115 | 168 | | |
| |||
0 commit comments