Build Docker Image Fail: Exiting on User Command

Build Docker Image Fail: Exiting on User Command

The Dockerfile is as fellow:

FROM centos:latest

RUN yum install git \
    nginx && \
    pip install uwsgi \

The result of executing docker build command build

When using yum install pakage, we maybe make choice like this "Is this ok [y/d/N]", I can inter "y" easily in the terminal. But how can I select the choice when I build an image with the Dockerfile ? Thanks a lot!

1 Answer

Simply add -y to yum.

Example:

RUN yum -y install git ...
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.