Update container image with KUSANAGI Runs on Docker

In the previous article "Until KUSANAGI Runs on Docker runs on Vultr (Part 4)", we built a KUSANAGI RoD environment in Vultr, which is a VPC environment, and made a river. I created an https-portal environment as a professional server. This time I would like to update the container image of KUSANAGI Runs on Docker.

Among the containers used in KUSANAGI ROD, the following containers have been updated.

Update the docker-compose.yml file.

docker-compose.yml


version: '3'

networks:
  default:
    driver: bridge
    driver_opts:
      com.docker.network.driver.mtu: 9000
  shared-network:
    external: true

services:
  httpd:
    container_name: kusanagi01_httpd
    #image: primestrategy/kusanagi-nginx:1.17.9-r0
    image: primestrategy/kusanagi-nginx:1.19.3-r0
    restart: always
    env_file:
      - .kusanagi
      - .kusanagi.httpd
    volumes:
      - kusanagi:/home/kusanagi
      #- kusanagi:/etc/letsencrypt
      #- kusanagi:/var/www/html/.well-known
      - ./nginx/nginx.conf:/etc/nginx/nginx.conf
    #ports:
      #- "8080:8080"
      #- "8443:8443"
    extra_hosts:
      - "fqdn:127.0.0.1"
    networks:
      - shared-network

        #certbot:
        #container_name: kusanagi01_certbot
        #image: certbot/certbot:v1.6.0
        #restart: always
        #network_mode: "service:httpd"
        #env_file:
        #- .kusanagi.httpd
        #volumes:
        #- kusanagi:/var/www/html/.well-known
        #- kusanagi:/etc/letsencrypt
        #command:
        #- --version

## CONFIG
  config:
    container_name: kusanagi01_config
    restart: always
    build:
        context: ./wpcli
    user: "1000:1001"
    env_file:
      - .kusanagi
      - .kusanagi.wp
      - .kusanagi.db
    volumes:
      - database:/var/run/mysqld
      - kusanagi:/home/kusanagi
    command: wp --version

  php:
    container_name: kusanagi01_php
    #image: primestrategy/kusanagi-php:7.4.8-r0
    image: primestrategy/kusanagi-php:7.4.9-r0
    restart: always
    env_file:
      - .kusanagi
      - .kusanagi.php
      - .kusanagi.mail
    network_mode: "service:httpd"
    volumes:
      - database:/var/run/mysqld
      - kusanagi:/home/kusanagi
      - ./php/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini

## MYSQL 
  db:
    container_name: kusanagi01_db
    #image: mariadb:10.5.4-focal
    image: mariadb:10.5.6-focal
    restart: always
    user: "999:999"
    env_file:
      - .kusanagi.mysql
    network_mode: "service:httpd"
    volumes:
      - database:/var/run/mysqld
      - database:/var/lib/mysql
 
## FTPD
  ftp:
    container_name: kusanagi01_ftp
    image: primestrategy/kusanagi-ftpd:1.0.2-r1
    restart: always
    network_mode: "service:httpd"
    env_file:
      - .kusanagi
      - .kusanagi.wp
    volumes:
      - kusanagi:/home/kusanagi


volumes:
  kusanagi:
  database:

Recreate the container with the docker command.

$ docker-compose stop
$ docker-compose up -d
Pulling httpd (primestrategy/kusanagi-nginx:1.19.3-r0)...
1.19.3-r0: Pulling from primestrategy/kusanagi-nginx
df20fa9351a1: Already exists
5af32d8d47ac: Pull complete
e55c96c86184: Pull complete
936d68b47fc1: Pull complete
a8c682723ffa: Pull complete
03145aaddb69: Pull complete
497c91cb4efa: Pull complete
639014dd9611: Pull complete
804c2b55bd45: Pull complete
8ba2747f59ab: Pull complete
2d3ef1c004b5: Pull complete
151010cd7bea: Pull complete
7368eee41ec2: Pull complete
054bb2aec8f7: Pull complete
c2cbc49740f5: Pull complete
Digest: sha256:00c7d727578796793afb9e02c006f631119f5f778c304b71d71308dc81661d8c
Status: Downloaded newer image for primestrategy/kusanagi-nginx:1.19.3-r0
Pulling php (primestrategy/kusanagi-php:7.4.9-r0)...
7.4.9-r0: Pulling from primestrategy/kusanagi-php
df20fa9351a1: Already exists
b358d6dbbdff: Already exists
0232d962484c: Already exists
0c1d3ac04d2a: Already exists
69251dafcb2d: Pull complete
f1f538119c59: Pull complete
cfbff98e6534: Pull complete
c2aadec4cc8c: Pull complete
b2ed7d8627c3: Pull complete
a5f68329b27f: Pull complete
e2a454f2222e: Pull complete
f3b64d79d270: Pull complete
11d91a2e79d9: Pull complete
86b38ba94154: Pull complete
928fdca444e9: Pull complete
37da8ddee44c: Pull complete
de5ab4f13129: Pull complete
7b2c6c5559bf: Pull complete
be5013ba038f: Pull complete
45921131dc11: Pull complete
d84b8c09a0dc: Pull complete
Digest: sha256:954b368151a8d255411e0722c246976dd79bb9cb2438584cca253978c542e4bc
Status: Downloaded newer image for primestrategy/kusanagi-php:7.4.9-r0
Pulling db (mariadb:10.5.6-focal)...
10.5.6-focal: Pulling from library/mariadb
d72e567cc804: Pull complete
0f3630e5ff08: Pull complete
b6a83d81d1f4: Pull complete
4bf2111ecf0e: Pull complete
9572d64978a0: Pull complete
bcc9953bffb3: Pull complete
de429570dda5: Pull complete
3652bc6ea9f9: Pull complete
6e4bf87041c8: Pull complete
96e489d6af27: Pull complete
baaf018282fc: Pull complete
1cca1ca0b2da: Pull complete
Digest: sha256:3e6a64c089460fb3403b5d3458ace9710d0be94f3dfdaaaeb74945dbb8e5671c
Status: Downloaded newer image for mariadb:10.5.6-focal
Starting kusanagi01_config  ... done
Recreating kusanagi01_httpd ... done
Recreating kusanagi01_php   ... done
Recreating kusanagi01_ftp   ... done
Recreating kusanagi01_db    ... done

$ docker-compose ps
      Name                     Command                 State            Ports       
------------------------------------------------------------------------------------
kusanagi01_config   docker-entrypoint.sh wp -- ...   Restarting                     
kusanagi01_db       docker-entrypoint.sh mysqld      Up                             
kusanagi01_ftp      /bin/sh -c /docker-entrypo ...   Up                             
kusanagi01_httpd    /docker-entrypoint.sh /usr ...   Up           8080/tcp, 8443/tcp
kusanagi01_php      /usr/local/bin/docker-entr ...   Up

Recommended Posts

Update container image with KUSANAGI Runs on Docker
If you have trouble uploading Wordpress image files with KUSANAGI Runs on Docker
If you are having trouble updating your Wordpress plugin with KUSANAGI Runs on Docker
[Docker] How to update using a container on Heroku and how to deal with Migrate Error
Time is wrong with the application launched on the Docker container
Install openjdk8 on Docker image (Debian)
Run lambda with custom docker image
Run React on a Docker container
Run GUI application on Docker container
Deploy Flask's Docker image on Heroku
Restart apache with docker php-apache image
[Linux] Start Apache container with Docker
Update MySQL from 5.7 to 8.0 with Docker
Build WebRTC Janus with Docker container
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
Minimal Workflow to push Docker image to Github Container Registry with Github Actions
Run (provisionally) a Docker image with ShellCommandActivity on AWS Data Pipeline
Build debug environment on container --Build local development environment for Rails tutorial with Docker-
Customize OpenFOAM v8 Docker Image on Mac
Run NordVPN on Docker (Windows) Ubuntu container
Starting with installing Docker on EC2 and running Yellowfin in a container
Proxy server with squid using docker image
Allow image posting with [Docker + WordPress + MySQL]
Image flew when updating Docker with WSL2
[Docker] Start container, start bash in container, delete image
Created a Docker container image for an OpenLDAP server based on Fedora
Build an environment with Docker on AWS
Launched Redmine with Docker on Raspberry Pi 3
Run Ubuntu + ROS with Docker on Mac
Monitor the Docker container and SystemD process on the same host with Zabbix on Ubuntu.
A quick note on using jshell with the official Docker image of the JDK
Try running MPLS-VPN with FR Routing on Docker
Run GUI application on Docker container (Japanese input)
Create a Lambda Container Image based on Java 15
Introducing Rspec with Ruby on Rails x Docker
Environment construction command memo with Docker on AWS
Keep docker container running with no resident process running
Try running OSPF with FR Routing on Docker
Display Mat type image on GUI with Swing
How to give your image to someone with docker
I tried running Ansible on a Docker container
Launch Docker image with initial data injected with docker-compose
Docker Container Operations with Docker-Client API for Java
Change the location folder of Docker image & container
Try using another Servlet container Jetty with Docker
Liberty on Docker
Create a Java (Gradle) project with VS Code and develop it on a Docker container
Small Docker container
Proceed with the official Rust documentation on a Docker container (2. Program a number guessing game)
Create a Java (Maven) project with VS Code and develop it on a Docker container
Redmine on Docker
Create a docker image that runs a simple Java app
Until you try running Apache Kafka with docker image
Steps to push Docker image to GitHub Container Registry (ghcr.io)
Systemctl cannot be used on Ubuntu inside Docker container
Conveniently insert / update records with MySQL INSERT ... ON DUPLICATE KEY UPDATE
Access and debug Circle CI Docker container with ssh
Error encountered with notes when deploying docker on rails
[ARM64] Docker server monitoring with New Relic on Docker on RasPi4
Run the Android emulator on Docker using Android Emulator Container Scripts
Deadlocked story with bulk insert on duplicate key update