我试图运行mysql到修改后的ubuntu映像,其中包括安装Node.js和使用下面的docker文件安装基本的MysqL
# Memcached
# use the ubuntu base image provided by dotCloud
FROM ubuntu/MysqLbase
MAINTAINER Hitesh
# make sure the package repository is up to dat//e
#RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
#RUN apt-get update
#RUN apt-get install -y MysqL-client
#ENTRYPOINT ["wc","-l"]
#ENTRYPOINT ["echo","running"]
ENTRYPOINT MysqLd_safe & sleep 10
#RUN MysqL
RUN echo "[MysqLd]" >/etc/MysqL/conf.d/docker.cnf
RUN echo "bind-address = 0.0.0.0" >>/etc/MysqL/conf.d/docker.cnf
RUN echo "innodb_flush_method = O_DSYNC" >>/etc/MysqL/conf.d/docker.cnf
RUN echo "skip-name-resolve" >>/etc/MysqL/conf.d/docker.cnf
RUN echo "init_file = /etc/MysqL/init" >>/etc/MysqL/conf.d/docker.cnf
RUN echo "GRANT ALL ON *.* TO root@'%'" >/etc/MysqL/init
USER root
EXPOSE 3306
使用以下命令运行此服务器时
sudo docker run -p 3306:13306 MysqL/dockerfiletest
遇到以下错误
ERROR 2002 (HY000): Can't connect to local MysqL server through socket '/var/run/MysqLd/MysqLd.sock' (2)
最佳答案
原文链接:https://www.f2er.com/docker/435998.html