GithubHelp home page GithubHelp logo

hexops / dockerfile Goto Github PK

View Code? Open in Web Editor NEW
4.0K 4.0K 153.0 72 KB

Dockerfile best-practices for writing production-worthy Docker images.

License: Other

Dockerfile 100.00%
containers dockerfile kubernetes oci uids

dockerfile's People

Contributors

chaosex avatar eric-hc avatar evancharlton avatar khaledhassan avatar mateusz-bajorek avatar nothub avatar slimsag avatar split-n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockerfile's Issues

Provided addgroup and adduser cmds don't work for Ubuntu based images

This docker cmd
RUN addgroup -g 10001 -S nonroot && adduser -u 10000 -S -G nonroot -h /home/nonroot nonroot
does not work for Ubuntu based images.
Got error like:

 > [stage-1 5/9] RUN addgroup -g 10001 -S nonroot && adduser -u 10000 -S -G nonroot -h /home/nonroot nonroot:                             
#9 0.427 Option g is ambiguous (gecos, gid, group)
#9 0.427 Option s is ambiguous (shell, system)

addgroup on Ubuntu desktop doesn't have same arguments like the ones provided in the docker file

Replaced it with:

RUN groupadd --gid 10001 nonroot && \
         useradd  --home-dir /home/nonroot \
                        --shell /bin/bash \
                        --create-home
                        --gid nonroot \
                        --groups nonroot \
                        --uid 10000 nonroot

Please let me know if I got the mapping right. I don't know what -S argument represents in your cmd

FAQ `tini` link is broken

The problem is in this line:

- [Is `tini` still required in 2020? I thought Docker added it natively?](is-tini-still-required-in-2020-i-thought-docker-added-it-natively)

There is a missing #

- [Is `tini` still required in 2020? I thought Docker added it natively?](#is-tini-still-required-in-2020-i-thought-docker-added-it-natively)

Typo Fix

It might not be a big thing but I suggest to fix the spellings in the bellow sentences.
priviledge --> privilege

host priviledge escalation could occur
because if someone does manage to escalate priviledges outside the Docker container

Lack of Info

Hi, first of all I would like to say thank you so much for creating this awesome repo.

But sorry, I misunderstood two steps which are

  • In Tiny section, you said, "Replace 'myapp' above with your binary". What kind of binary do you mean? Would you mind giving us an example for that?
  • And the last one you said, "Default arguments for your app (remove if you have none)". What kind of app arguments do you mean? Also would you mind giving us an example for that? Let's say I'm gonna deploy a Node JS app.

Thanks for understanding.

Static UID and GID on OpenShift

I’m interested in your thoughts on building images for platforms like Red Hat OpenShift, which override the UID/GID of the image when a container is run (using an unpredictable, high UID). This adds security, but causes problems with file permissions unless the image author builds in permission fixes.
I haven’t found a simple to implement, general best practice that works with these platforms... it’s usually some hacky chmod script acting on application specific folders/files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.