Docker Community Forums

Share and learn in the Docker community.

Need help with Dockerfile that builds software in debian environment

Hi there,
I have a program that requires to be built on debian because of package requirements. However, most CI services don’t support debian as a build environment, only ubuntu. Could anyone help me with a dockerfile that runs the following commands inside a debian container. They will be in the same directory as the dockerfile.

chmod u+x


hey you can copy the file in docker file and run the sh script
like below

# debian image
FROM debian


USER root

# install dependencies require to run you

RUN chmod +x /


# further more code

When running this, I get the error: E: Invalid operation update when running apt-get update

i am not getting any error on apt-get update command.
can you please provide full error message and also check there is any syntax or typo error.

Never mind. I just realized that it was because I was saving it with Windows line endings instead of unix line endings.

When the script runs cdebootstrap, it works for a while and then says E: Failed to unshare: Operation not permitted