Permission denied

i want to type this
apt-get update

apt-get install net-tools

ifconfig

but i have error:(

Hi,

You must be using a root user to use these commands. You’ve built your service using Buildpack builder which does not provide a root user.

I would recommend using a Dockerfile and setting USER root in it.

Then, change your builder type to Dockerfile and you will be able to run these commands.

thanks for your answer
so i tried and :
Build ready to start :arrow_forward:

Cloning GitHub - swk3087/server commit sha 52ac1bf7619d8482e840684a9c3c178441d2f4c3 into /builder/workspace
Initialized empty Git repository in /builder/workspace/.git/
From GitHub - swk3087/server

  • branch 52ac1bf7619d8482e840684a9c3c178441d2f4c3 → FETCH_HEAD
    HEAD is now at 52ac1bf Update server.js
    Starting Docker daemon…
    Waiting for the Docker daemon to start…
    done
    #1 [internal] load build definition from Dockerfile
    #1 transferring dockerfile: 2B done
    #1 DONE 0.0s
    error: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
    Build failed :x:

You need to write this Dockerfile.

Here are guidelines for it. Writing a Dockerfile | Docker Docs

thanks i I did it.

2 Likes