1

The next cmd returns the error: unknown flag: --build-arg Why?

docker run --name=my_dev_server --network=host --privileged \
     -v /dev:/dev \
       --build-arg USERNAME=`${USER}` \
       --user=`id -u ${USER}` \
       --env="DISPLAY" \
       --volume="/etc/group:/etc/group:ro" \
       --volume="/etc/passwd:/etc/passwd:ro" \
       --volume="/etc/shadow:/etc/shadow:ro" \
       --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
       --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
      -it jccz/android_dev:v1 /bin/bash
1
  • 4
    because --build-arg is for build Commented Aug 27, 2021 at 21:49

1 Answer 1

5

There is no --build-arg option for run, it's available only for build

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.