-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switching to a bare-based image will reduce the overall image size and reduces attack surface area. Adding the ``CGO_ENABLED=0`` will result in the go binary being statically linked, which means it won't need the ``/lib`` and ``/lib64`` folders to run. This allows us to switch the base image to bare, greatly reducing the image size. Adds an extra sanity check during the integration test, making sure that there is no error reported in Pebble while starting the service.
- Loading branch information
1 parent
6618a5d
commit f30b986
Showing
2 changed files
with
19 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -18,7 +18,7 @@ description: | | |
license: Apache-2.0 | ||
version: 0.0.1 | ||
|
||
base: [email protected] | ||
base: bare | ||
build-base: [email protected] | ||
run-user: _daemon_ | ||
|
||
|
@@ -48,6 +48,7 @@ parts: | |
build-environment: | ||
- GOOS: linux | ||
- GOARCH: $CRAFT_ARCH_BUILD_FOR | ||
- CGO_ENABLED: 0 | ||
go-generate: | ||
- ./cmd | ||
organize: | ||
|
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