Last active
July 3, 2020 00:45
-
-
Save Fazendaaa/e10f74642b30e893a8724eb791e9933f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build --platform=local -o . git://github.com/docker/buildx | |
mkdir -p ~/.docker/cli-plugins | |
mv buildx ~/.docker/cli-plugins/docker-buildx | |
docker buildx create --name mybuilder | |
docker buildx use mybuilder | |
docker buildx inspect --bootstrap | |
# https://github.com/docker/docker-ce/blob/master/components/cli/experimental/README.md | |
sudo printf "{\n\t\"experimental\": true\n}\n" | sudo tee /etc/docker/daemon.json | |
SHELL_RC="/dev/null" | |
if [ "/bin/zsh" == $SHELL ] | |
then | |
SHELL_RC="/.zshrc" | |
fi | |
if [ "/bin/bash" == $SHELL ] | |
then | |
SHELL_RC="/.bashrc" | |
fi | |
printf "\n\ | |
# multiarch script configurations\n\ | |
export DOCKER_CLI_EXPERIMENTAL=enabled\n\ | |
export DOCKER_BUILDKIT=1\n\ | |
" >> $HOME$SHELL_RC | |
# ESTES ARQUIVOS ESTÃO EM ANEXO - os baixe antes de rodar o script | |
cp dockermultiarch.service /etc/systemd/system/ | |
cp dockermultiarch /usr/bin/ | |
chmod 755 /usr/bin/dockermultiarch | |
systemctl enable dockermultiarch.service | |
systemctl start dockermultiarch.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=DockerMultiArchSupportBuild | |
[Service] | |
ExecStart=/usr/bin/dockermultiarch | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment