Worpress in docker: wrong file permission
In wp-config.pgp
define('FS_CHMOD_DIR', 0777);
8 августа 2024, 14:01
define('FS_CHMOD_DIR', 0777);
# Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
docker compose up -d
docker cp <source_path> <container_id>:<destination_path> docker cp <container_id>:<source_path> <destination_path>
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get --assume-yes install docker-ce docker-ce-cli containerd.io
docker-compose down -v
docker inspect -f '{{ .Mounts }}' containerid
sudo apt-get remove -y docker docker-engine docker.io containerd runc sudo apt-get update sudo apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io
docker run \ -e "NODE_ENV=production" \ -u "node" \ -m "300M" --memory-swap "1G" \ -w "/home/node/app" \ --name "my-nodejs-app" \ node [script]
docker restart $(docker ps -a -q)
version: '3.1' services: jira: image: zhangguanzhang/atlassian-jira-software:8.0.0 container_name: jira8 restart: always environment: - "CATALINA_OPTS= -Xms1024m -Xmx4096m" links: - database volumes: - /home/jira8.0/data:/var/atlassian/jira - /home/jira8.0/logs:/opt/atlassian/jira/logs - /etc/localtime:/etc/localtime:ro ports: - '80:8080' database: restart: always container_name: jira8db image: percona:5.7 environment: - MYSQL_DATABASE=jira - MYSQL_USER=jira - MYSQL_PASSWORD=jira - MYSQL_ROOT_PASSWORD=jira volumes: - /home/jira8.0/db:/var/lib/mysql ports: - "127.0.0.1:3306:3306" command: - '--collation-server=utf8_bin' - '--character-set-server=utf8' - '--max_allowed_packet=34M' - '--innodb_log_file_size=256M'
docker-compose up -d --force-recreate --build
docker inspect <container-id-or-name> | grep Gateway
sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
#!/bin/bash # Delete all containers docker rm $(docker ps -a -q) # Delete all images docker rmi $(docker images -q) docker system prune # Delete all volumes docker volume prune