-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⭐ add mondoo/devkit container (#419)
* ⭐ add mondoo/devkit container Purpose-built for MQL, policy and querypack development, this container comes with all providers for compiling and linting, but none of the size. It removes all binaries for providers and focuses on linting and validation requirements (ie schemas). Signed-off-by: Dominik Richter <[email protected]> * 🟢 spelling Signed-off-by: Dominik Richter <[email protected]> --------- Signed-off-by: Dominik Richter <[email protected]>
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 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
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,29 @@ | ||
# Copyright (c) Mondoo, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
# Mondoo Multi-Architecture Container Dockerfile | ||
# | ||
# To build root images with BuildX: docker buildx build --build-arg VERSION=5.21.0 --platform | ||
# linux/386,linux/amd64,linux/arm/v7,linux/arm64 --target root -t mondoolabs/mondoo:5.21.0 . --push | ||
# | ||
# To build rootless images with BuildX: docker buildx build --build-arg VERSION=5.21.0 --platform | ||
# linux/386,linux/amd64,linux/arm/v7,linux/arm64 --target rootless -t mondoolabs/mondoo:5.21.0 . --push | ||
|
||
ARG VERSION | ||
FROM docker.io/mondoo/cnspec:${VERSION} AS root | ||
WORKDIR /mnt | ||
|
||
RUN ln -s /usr/local/bin/cnspec /usr/local/bin/mondoo | ||
# force the installation of all providers that the linter needs | ||
RUN touch empty.mql.yaml && cnspec bundle lint empty.mql.yaml && rm $(find /opt/mondoo/providers -not -name "*.json" -type f) | ||
RUN mkdir -p /home/mondoo/.config/mondoo && echo "auto_update: false" > /home/mondoo/.config/mondoo/mondoo.yaml | ||
|
||
ENTRYPOINT [ "cnspec" ] | ||
CMD ["bundle", "lint"] | ||
|
||
# Rootless version of the container | ||
FROM root AS rootless | ||
|
||
RUN addgroup -S mondoo && adduser -S -G mondoo mondoo | ||
USER mondoo | ||
|
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