docker buildx ls

 

docker buildx create --name mybuilder

 

docker buildx use mybuilder
docker buildx inspect --bootstrap

 

mkdir test && cd test && cat <<EOF > Dockerfile

 

docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t liusming/demo:latest --push .


參考資料

  1. https://engineering.docker.com/2019/04/multi-arch-images/
  2. https://docs.docker.com/buildx/working-with-buildx/
  3. http://www.inanzzz.com/index.php/post/w4i9/running-mysql-server-as-foreground-on-ubuntu-with-dockerfile
  4. https://hub.docker.com/_/mysql

附錄:

  • MySQL相闗指令
grant all privileges on *.* to 'root'@'%' identified by 'pswd;

FLUSH PRIVILEGES; 

 ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

grant all privileges on *.* to 'root'@'%' identified by '123456';

# MySQL
ENV MYSQL_PWD Pwd123
RUN echo "mysql-server mysql-server/root_password password $MYSQL_PWD" | debconf-set-selections
RUN echo "mysql-server mysql-server/root_password_again password $MYSQL_PWD" | debconf-set-selections
RUN apt-get -y install mysql-server

參考資料

https://blog.csdn.net/lambert310/article/details/53377301

https://alvinalexander.com/blog/post/mysql/show-users-i-ve-created-in-mysql-database

  • Adminer Docker
docker run --link some_database:db -p 8080:8080 adminer

https://hub.docker.com/_/adminer/

arrow
arrow
    全站熱搜

    liusming 發表在 痞客邦 留言(0) 人氣()