How to set Architecture for docker build to arm64?

For building single docker images: Set your environment variable using the command line or modifying your .bashrc or .zshenv file. (introduced in v19.03.0 in 03/2019) export DOCKER_DEFAULT_PLATFORM=linux/arm64 Alternatively, in the Dockerfile, include the following flag in the FROM command (for a multi-stage Dockerfile build, the flag is only needed for the first stage): FROM –platform=linux/arm64 … Read more

Docker command fails during build, but succeeds while executed within running container

The pwd is not persistent across RUN commands. You need to cd and configure within the same RUN. This Dockerfile works fine: FROM ubuntu:12.10 RUN apt-get update RUN apt-get -y install libpcre3 libssl-dev RUN apt-get -y install libpcre3-dev RUN apt-get -y install wget zip gcc RUN wget http://nginx.org/download/nginx-1.4.1.tar.gz RUN gunzip nginx-1.4.1.tar.gz RUN tar -xf nginx-1.4.1.tar … Read more

Docker compose error while creating mount source path

It’s likely a pathing issue with Docker when installed with snap, you’re better off installing it with the official documentation from Docker. Remove docker from snap snap remove docker Remove the docker directory, and old version (It’s okay if these don’t exist already) rm -R /var/lib/docker sudo apt-get remove docker docker-engine docker.io Install the official … Read more

Docker buildkit cache location/size and ID

Yes, it is somewhat vague in docker 20.10.5. Could use a pull request or two to update documentation. The docker driver cache uses the same storage driver as used for image layers. Metadata is stored in databases at /var/lib/docker/buildkit. When docker uses overlay2 storage driver, the layer is in /var/lib/docker/overlay2/<ID>/diff/. For <ID>, see below. /var/lib/docker … Read more

How to create a queue in RabbitMQ upon startup

You can predefine queues and exchanges without creating own rabbit-mq docker image. Your docker-compose should look like this: rabbit: container_name: rabbitmq-preload-conf image: rabbitmq:3-management volumes: – ./init/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro – ./init/definitions.json:/etc/rabbitmq/definitions.json:ro ports: – “5672:5672” – “15672:15672” In this case rabbitmq.conf and definitions.json files should be in init folder in the same parent folder as docker-compose file rabbitmq.conf file … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)