-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christian Zunker <[email protected]> Signed-off-by: Scott Ford <[email protected]> Co-authored-by: Scott Ford <[email protected]>
- Loading branch information
1 parent
3957d80
commit 7883f00
Showing
19 changed files
with
654 additions
and
1,300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
golang-version=1.21.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright (c) Mondoo, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
packer { | ||
required_plugins { | ||
docker = { | ||
version = ">= 0.0.7" | ||
source = "github.com/hashicorp/docker" | ||
} | ||
cnspec = { | ||
version = ">= 9.0.0" | ||
source = "github.com/mondoohq/cnspec" | ||
} | ||
} | ||
} | ||
|
||
variable "image_prefix" { | ||
type = string | ||
description = "Prefix to be applied to image name" | ||
default = "mondoo-gcp-ubuntu-2004-secure-base" | ||
} | ||
|
||
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } | ||
|
||
source "docker" "ubuntu" { | ||
image = "ubuntu:jammy" | ||
commit = true | ||
} | ||
|
||
build { | ||
name = "mondoo-docker-ubuntu-2204-secure-base" | ||
sources = [ | ||
"source.docker.ubuntu" | ||
] | ||
|
||
provisioner "shell" { | ||
inline = [ | ||
"echo \"${var.image_prefix}-${local.timestamp}\" > /etc/hostname", | ||
] | ||
} | ||
|
||
provisioner "cnspec" { | ||
on_failure = "continue" | ||
asset_name = "${var.image_prefix}-${local.timestamp}" | ||
annotations = { | ||
Name = "${var.image_prefix}-${local.timestamp}" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.