Skip to content

vimkim/cubrid-dev2-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How To Configure?

Configure podman network (ipvlan)

You might want to change the IP_RANGE.

./podman-network.sh

It is known that such network drivers like ipvlan requires rootful podman, therefore you might need sudo podman.

Build Docker image (r8 with systemd)

just build

or,

sudo docker build -t local/r8-systemd .

Both are equivalent.

Run containers

Edit containers.yaml file, and run

python run_dev_containers.py

Utility Scripts

podman-multiexec.sh

In order to execute a script in multiple containers that match a specific filter, you can use the podman-multiexec.sh utility script.

Usage: ./utils/podman-multiexec.sh -f <filter> -s <script> [options]

Options:
  -f, --filter <filter>    Filter containers by name pattern
  -s, --script <script>    Shell script to execute
  -v, --verbose           Enable verbose output
  -x, --execute           Actually execute the script (default is dry-run)
  -h, --help              Show this help message

Examples:
  ./utils/podman-multiexec.sh -f vimkim -s abc.sh                    # Dry run (default)
  ./utils/podman-multiexec.sh -f vimkim -s abc.sh --execute          # Actually execute
  ./utils/podman-multiexec.sh -f nginx -s abc.sh -x                  # Actually execute

⚠️ Important Warnings

  • Always include your username in the filter to avoid affecting other users' containers
  • The filter supports regular expressions and wildcards due to podman's filtering capabilities
  • DO NOT use broad patterns like '.*' or '*' with destructive commands (e.g., /bin/rm -rf) as this can damage all matching containers
  • Always test with dry-run mode first (default behavior) before using the -x flag to execute
  • Use caution when executing system-level commands across multiple containers

Q & A

❓ Why is the Docker image so large and why are there so many layers? 2 GB?

💬 Answer:

The Dockerfile is intentionally structured with many layers and a larger final image size not to optimize for the minimal image size, but to optimize for faster iterative development and rebuild times.

During development, we prioritize build efficiency over the final image size. By keeping more layers and structuring the Dockerfile to maximize the use of Docker's layer cache, we can:

  • Avoid redoing expensive steps when only a small part of the code or configuration changes
  • Reuse previous build artifacts as much as possible
  • Speed up feedback cycles and local testing
  • Improve CI performance when caching is available

This trade-off is intentional and helps improve developer productivity and iteration speed.

If a smaller image is desired for production deployment, a separate, more optimized Dockerfile (e.g., using multi-stage builds or distroless images) can be used.

IP address already in use

Once I recraeted the ipvlan network, and create a container with the previously used IP address, I got the following error:

IP address already in use ...

Solution is the following. Caution: this will stop all podman processes and clear the network cache. Know what you are doing.

# Restart network namespace
sudo ip netns list  # check for any leftover namespaces
sudo ip netns delete <namespace_name>  # if any exist

# Reload netowrk modules
sudo systemctl restart NetworkManager
sudo systemctl restart systemd-networkd
# Stop all podman processes
sudo pkill -f podman
sudo pkill -f conmon

Clear any remaining network cache.

# Flush route cache
sudo ip route flush cache

# Clear ARP/neighbor cache
sudo ip neigh flush all

About

Dev Server Environment Setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published