Docker Community Forums

Share and learn in the Docker community.

Installing mysql on ubuntu base image

I am new to Docker and I am trying to install non interactive mysql on an ubuntu 14.04 base image. The error I am getting is

The command ‘/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server’ returned a non-zero code: 100

How to I fix this ?

I was trying by using the following command in my dockerfile:

FROM ubuntu:14.04
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server

I always run apt-get update before running apt-get install on Ubuntu. Perhaps this is your problem?

Hi ktwalrus,

I have already tried that and nothing happens, the same error persists

FROM ubuntu:14.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server

worked for me.

1 Like

I follow the command but what will be default password? once installation complete