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 .
參考資料
- https://engineering.docker.com/2019/04/multi-arch-images/
- https://docs.docker.com/buildx/working-with-buildx/
- http://www.inanzzz.com/index.php/post/w4i9/running-mysql-server-as-foreground-on-ubuntu-with-dockerfile
- 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
全站熱搜
留言列表