Questions tagged [distroless]

"Distroless" images contain only your application and its runtime dependencies. They do not contain package managers, shells or any other programs you would expect to find in a standard Linux distribution. Use this tag when looking for help creating images that have a distroless base-image.

34 questions
7
votes
2 answers

nobody & nonroot user in distroless images

Distroless images comes with 3 users : > docker run --rm --entrypoint cat gcr.io/distroless/nodejs:debug…
Will
  • 1,792
  • 2
  • 23
  • 44
5
votes
1 answer

AWS ECS Fargate Memory Utilization vs Local Docker

We are using AWS Fargate ECS Tasks for our spring webflux java 11 microservice.We are using a FROM gcr.io/distroless/java:11 java image. When our application is dockerised locally and deployed as a image inside a docker container the memory…
4
votes
1 answer

Golang distroless Docker exec failed: No such file or directory when CGO is enabled

I was trying to get a minimal example go app running inside a docker container. But I kept getting exec /app: no such file or directory when running the container. I checked and double checked all my paths in the image where I built and copied my…
asturm
  • 69
  • 2
  • 9
2
votes
0 answers

How do you do Spring Health Check using the Dockerfile HEALTHCHECK when using distroless?

Since distroless does not contain a shell or package manager, if I were to use gcr.io/distroless/java17-debian11, how would I implement something like HEALTHCHECK --interval=5s --start-period=60s \ CMD curl -sfo /dev/null…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
2
votes
1 answer

update glibc package in distroless

i am using use multi stage docker build for distroless and using "gcr.io/distroless/java:8" for my container but the packages version installed by gcr.io/distroless/java:8 have several security issues such as glibc 2.31…
2
votes
2 answers

how to take thread dump of java application on a distroless container running on kubernetes?

My cluster have many java applications running on it, I would like to take thread dump for few microservices. But as these are distroless images, I was thinking of ephemeral containers but not sure if volume can be attached to such containers. Can…
2
votes
2 answers

Passing customizable options to a GraalVM image execution in a distroless environment

For context, I'm building a java application compiled to GraalVM native image running on a distroless docker image in Kubernetes. I've been trying to do something rather simple and hit a wall: I'd like to set custom heap size limits per environment…
Inqy
  • 125
  • 1
  • 8
1
vote
1 answer

Error with Python3 on distroless image [No such file]

I'm using this dockerfile with flask : FROM python:3.8-slim-buster WORKDIR /python-docker COPY requirements.txt requirements.txt RUN pip3 install -r requirements.txt COPY . . CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"] It works…
GG24
  • 183
  • 3
  • 17
1
vote
1 answer

preStop hook using image distroless/java17:nonroot

Does anyone had success implementing preStop hook with distroless/java17:nonroot ? Here is my (default) deployment: # [...] lifecycle: preStop: exec: command: ["sh", "-c", "sleep 10"] …
Jonathan Chevalier
  • 993
  • 1
  • 9
  • 18
1
vote
0 answers

Install JMAP inside a docker container

How can I install jmap on my docker container to get its heap dump once its deployed to AWS ECS as a container.I am using distroless as my base java image.Below is my dockerFile.I have managed to install all other utilities in my container other…
Amol Kshirsagar
  • 253
  • 3
  • 16
1
vote
0 answers

Difference of similar, yet different java distroless images

I have tried to find out in the different readmes and information sections available, but didn't find an answer, so also a possible trace to where I might be able to find this out would help a lot: What is the difference between the different java…
Thomas W
  • 111
  • 1
  • 7
1
vote
1 answer

How to construct a minimal "distroless" image to run a golang service, which runs a java subservice?

Right now I have an program, written in golang, that I am trying to run within a minimal container. When launched, this go program happens to start up another sub-program written in java, which also needs to run in the container. I am wondering how…
user313
  • 681
  • 1
  • 8
  • 21
1
vote
3 answers

Is it possible to start a process using RUN command in Dockerfile?

Currently I have a dockerfile that runs two executables using an ampersand: FROM CMD ["bin/sh", "-c", "/service1 & /service2"] As I am looking to migrate this dockerfile to distroless, I will no longer be able to run this…
user313
  • 681
  • 1
  • 8
  • 21
1
vote
0 answers

integrating jdk with python venv

I am trying to integrate jdk with a python venv on a distroless docker container for my application I am not able to import java modules in the venv created in the distroless container How do i export jdk modules into the distroless container so…
1
vote
0 answers

ImportError: The 'enchant' C library was not found and maybe needs to be installed

I am trying to create a distroless container using gcr.io./distroless/python3-debian10 using base image as debian:buster-slim I've installed enchant in python virtual environment of the base image, then I've copied virtual environment to the…
1
2 3