Comments (3)
It sounds like you should be able to unblock by using a different base image, that runs as a user with permission to write to /etc
. You could use gcr.io/distroless/static-debian11:nonroot
as you do in the Dockerfile example, or another image.
The configuration used to override the base image is described here: https://ko.build/configuration/#overriding-base-images
from ko.
I have already tried to use gcr.io/distroless/static-debian11:nonroot
with KO but even with this image by default you do not have permissions and that is the reason i had to explicitly create an empty dir in the builder step and change the ownership while copying that folder from the builder to the final image (only possible when using docker with skaffold, currently i do not see a way to do this with ko unless of course if i miss something that i have not yet explored). Same problem for all distroless images with nonroot users.
from ko.
This isn't really a ko
issue. If you choose a base image that runs as a user that has permission to write to /etc
, things should work fine. Neither the default base image or gcr.io/distroless/static-debian11:nonroot
do that, but you can choose or build a base image that does allow that.
from ko.
Related Issues (20)
- feat: support specifying custom image names HOT 1
- feat: specify `KO_DOCKER_REPO` in `.ko.yaml` HOT 2
- Chainguard annotations are, but should not be, propagated to multi-platform manifest HOT 3
- The default value for --platform is not documented HOT 1
- ko build does not give me a way to put annotations in a multi-platform manifest HOT 1
- how to specify build tag when doing "ko build" to avoid build constraint error
- ko sbom binding strategy problem HOT 2
- Pushing to ECR without logging in first doesn't work HOT 3
- Support setting capabilities on the app binary HOT 2
- feature request: make it possible to set the WORKDIR HOT 1
- Missing SBOM image in image-refs file
- Question: set argv parameters for the built binaries? HOT 1
- Support local images with custom image name HOT 1
- feat: Add platform template parameters HOT 1
- feat: Add global ldflags
- feat: Add global env
- feat: Add git template variables HOT 1
- [Docs] Broken link to `builds` section
- 0.15.3 has breaking issues error resolving image references: build: go build: exit status 2: flag provided but not defined: -platform HOT 11
- docs: ko does not works without -bare option for ECR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ko.