We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8558480 commit 598df9fCopy full SHA for 598df9f
src/dockerc.zig
@@ -163,7 +163,7 @@ pub fn main() !void {
163
const offset_arg = try std.fmt.allocPrintZ(allocator, "{}", .{runtime_content.len});
164
defer allocator.free(offset_arg);
165
166
- const mksquashfs_args = [_:null]?[*:0]const u8{
+ var mksquashfs_args = [_:null]?[*:0]const u8{
167
"mksquashfs",
168
bundle_destination,
169
output_path,
@@ -172,8 +172,17 @@ pub fn main() !void {
172
"-offset",
173
offset_arg,
174
"-noappend",
175
+ "-force-uid",
176
+ "0",
177
+ "-force-gid",
178
179
};
180
181
+ // in rootfull, do not force uid/gid to 0,0
182
+ if (res.args.rootfull != 0) {
183
+ mksquashfs_args[mksquashfs_args.len - 4] = null;
184
+ }
185
+
186
mksquashfs_main(
187
mksquashfs_args.len,
188
&mksquashfs_args,
0 commit comments