BaşlayınÜcretsiz Başlayın

Be safe, don't use root

Not giving access to the root user in your images makes images more foolproof, as users only have access to what's relevant to the use case you intended for the image. Additionally, it is one of the best options to increase their security. We've built an image for you from the following Dockerfile, which tries to install python3 as soon as you start it.

FROM ubuntu
RUN useradd -m repl
USER repl
CMD apt-get install python3

Let's see what happens if we try to install python3 at startup as the repl user.

Bu egzersiz

Introduction to Docker

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Use docker to run the repl_try_install image.

Uygulamalı interaktif egzersiz

İnteraktif egzersizlerimizden biriyle teoriyi pratiğe dökün

Egzersizi başlat