Compare commits

..

1 Commits

Author SHA1 Message Date
Benjamin Bohard c9b1fa62c8 Étiquetage selinux pour une utilisation non-root 2023-02-01 08:32:02 +01:00
2 changed files with 8 additions and 8 deletions

14
package
View File

@ -41,7 +41,7 @@ def build_image(build_workspace, base_image, profile_name, profile, debug=False,
# Run hooks # Run hooks
tamarin.run_profile_hooks(profile, 'containerbuild', cwd=build_workspace, env=hooks_env, debug=debug) tamarin.run_profile_hooks(profile, 'containerbuild', cwd=build_workspace, env=hooks_env, debug=debug)
image_tag = "tamarin:{:s}_{:s}_{:d}".format(profile_name, base_image.replace(':', '_').replace('/', '_'), os.getpid()) image_tag = "tamarin:{:s}_{:s}_{:d}".format(profile_name, base_image.replace(':', '_'), os.getpid())
build_args = [ "build", "-t", image_tag ] build_args = [ "build", "-t", image_tag ]
@ -108,16 +108,16 @@ if __name__ == "__main__":
# volumes definition # volumes definition
docker_args += [ docker_args += [
"-v", "{:s}:/src:ro".format(project_dir), "-v", "{:s}:/src:z,ro".format(project_dir),
"-v", "{:s}:/dist".format(output_dir), "-v", "{:s}:/dist:z".format(output_dir),
] ]
if not args.no_lib_mounts: if not args.no_lib_mounts:
docker_args += [ docker_args += [
"-v", "{:s}:/tamarin/hooks:ro".format(tamarin.get_hooks_dir()), "-v", "{:s}:/tamarin/hooks:z,ro".format(tamarin.get_hooks_dir()),
"-v", "{:s}:/tamarin/lib:ro".format(tamarin.get_lib_dir()), "-v", "{:s}:/tamarin/lib:z,ro".format(tamarin.get_lib_dir()),
"-v", "{:s}:/tamarin/profiles:ro".format(tamarin.get_profiles_dir()), "-v", "{:s}:/tamarin/profiles:z,ro".format(tamarin.get_profiles_dir()),
"-v", "{:s}:/tamarin/utils:ro".format(tamarin.get_utils_dir()) "-v", "{:s}:/tamarin/utils:z,ro".format(tamarin.get_utils_dir())
] ]
# Use environment proxy if defined # Use environment proxy if defined

View File

@ -1,7 +1,7 @@
# Configuration générale du profil # Configuration générale du profil
[profile] [profile]
# Image Docker par défaut # Image Docker par défaut
default_image=reg.cadoles.com/proxy_cache/library/debian:bookworm default_image=debian:stretch
# Configuration de l'étape de pré-construction du conteneur # Configuration de l'étape de pré-construction du conteneur
[containerbuild] [containerbuild]