This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Commit 1ed1112
authored
feat: added support for specifying arch when building an image (#45)
### **PR Type**
Enhancement
___
### **Description**
• Added architecture parameter support to Docker image building
functions
• Set default architecture to `pkgs.go.GOARCH` for both generic and
Go-specific builders
• Enhanced `dockerImageFn` and `docker-image` functions with arch
configuration
• Improved cross-platform Docker image building capabilities
___
### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>generic.nix</strong><dd><code>Add architecture
parameter to generic Docker functions</code>
</dd></summary>
<hr>
lib/generic/generic.nix
• Added <code>arch</code> parameter with default value
<code>pkgs.go.GOARCH</code> to <br><code>dockerImageFn</code><br> •
Updated function calls to pass <code>arch</code> parameter to
<br><code>nix2container.buildImage</code><br> • Enhanced
<code>docker-image</code> function with <br>architecture support
</details>
</td>
<td><a
href="https://github.com/nhost/nixops/pull/45/files#diff-4fd7b531e0557f3d3821654731cc7ed209a62fa21ec7a5d93753481fd58d5340">+4/-2</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>go.nix</strong><dd><code>Add architecture parameter to
Go Docker functions</code>
</dd></summary>
<hr>
lib/go/go.nix
• Added <code>arch</code> parameter with default value
<code>pkgs.go.GOARCH</code> to <br>Go-specific
<code>dockerImageFn</code><br> • Updated function signatures and calls
to <br>include architecture parameter<br> • Enhanced Go Docker image
building <br>with cross-platform support
</details>
</td>
<td><a
href="https://github.com/nhost/nixops/pull/45/files#diff-1377128cceefd42b43cd5e407ec11a809c7aaec2d071a1ed0e3232f6dce63fad">+4/-2</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
___
> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>1 parent 6421c2f commit 1ed1112
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
176 | | - | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
0 commit comments