Q: My image only has the root user. How do I create non-privileged user to work with?
A: Create a user feature with a exec.config file like this:
useradd --user-group --create-home --shell=/usr/bin/bash --password="$(openssl passwd -6 user)" user
This will create a user named user with password user.
You might want to read the password from a file or environment variable which are not checked into version control.
Q: My user should be able to use sudo for admin purposes.
A: Create a file in your user feature file.include/etc/sudoers.d/USERNAME, with this contents: USERNAME ALL=(ALL) NOPASSWD: ALL
The purpose of this issue is to collect FAQ regarding the builder. Eventually, they should end up in documentation or automation where possible.
Q: My image's partitions are too small, how to make them bigger?
A: One option is to edit
fstab
in thebase
feature like in this exampleAdapt the size arguments as needed
Q: I'm trying to download something in a builder feature but it fails because the hostname can't be resolved
A: Resolv conf needs to be configured. You may add a feature
networking
with the following scripts and include that in your buildexec.early
:exec.post
:Q: My image only has the root user. How do I create non-privileged user to work with?
A: Create a
user
feature with aexec.config
file like this:This will create a user named
user
with passworduser
. You might want to read the password from a file or environment variable which are not checked into version control.Q: My user should be able to use sudo for admin purposes.
A: Create a file in your
user
featurefile.include/etc/sudoers.d/USERNAME
, with this contents:USERNAME ALL=(ALL) NOPASSWD: ALL
Q: How can I use ssh to work with the machine?
A: