Docker Community Forums

Share and learn in the Docker community.

Installing mysql on ubuntu base image

build
docker

(Ranjan Dhar) #1

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


(Ktwalrus) #2

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


(Ranjan Dhar) #3

Hi ktwalrus,

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


(Dburchill) #4

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

worked for me.