Wednesday, June 3, 2026

Run macOS in linux docker container

To be able to run macOS in linux docker container to access macOS applications without switch back and forth makes life easy. This project allow you to do that. The instruction given is very tricky, so I have written a step by step how to begin.


0. This is the main project which we will work on. Essentially we need to build an image where the image is not found in dockerhub at the moment.

```

$ git clone  https://github.com/sickcodes/Docker-OSX

$ cd Docker-OSX

$ docker build -t docker-osx:naked -f Dockerfile.naked .

```


1. Start the macOS installer, this will take some times. If clone repository OpenCorePkg is slow , add this `-v "<USERNAME>/macos/OpenCorePkg:/home/arch/OSX-KVM/OpenCorePkg"` to the command below. But make sure you have clone the repository before https://github.com/acidanthera/opencorepkg

```

$ docker run -it \

    --device /dev/kvm \

    -p 50922:10022 \

    -v /tmp/.X11-unix:/tmp/.X11-unix \

    -e "DISPLAY=${DISPLAY:-:0.0}" \

    -e GENERATE_UNIQUE=true \

    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \

    -e SHORTNAME=monterey \

    sickcodes/docker-osx:latest    

```


2. In the mean time, get the container id and note the container id

```

$ docker ps

```


3. A qemu screen will appear, click on `macOS Base System`. wait the messages loading is complete.




4. Once at the installer screen is up, then to erase the biggest disk. You can name the disk any name because it is not important. Example `my_macos_vd`.




5. Then reinstall the macOS. Pick the disk that you erase in step 4. This installation will take a long time. Approximately 1hour in my host machine.

6. Inspect the container and get the directory where we will copy out the disk. 
```
$ docker inspect 0a0fdebac3ac | grep Upper
                "UpperDir": "/var/lib/docker/overlay2/11043fba8b6ed2e4ffeaeb8a439d791f03081cd785a9a14e60024dc3e6c4f461/diff",
```

7. Once installation is done, power down the container. 

8. Based on the step 6, the value of `UpperDir`, now copy the `mac_hdd_ng.img` to another directory in your host. Any directory will do. I pick `~/macos/`
```
$ sudo su -
# cd /var/lib/docker/overlay2/11043fba8b6ed2e4ffeaeb8a439d791f03081cd785a9a14e60024dc3e6c4f461/diff
# ls -lh ./home/arch/OSX-KVM/mac_hdd_ng.img
-rw-r--r-- 1 jason jason 37G Jun  2 20:43 ./home/arch/OSX-KVM/mac_hdd_ng.img
# cp ./home/arch/OSX-KVM/mac_hdd_ng.img </home/USERNAME/>/macos/
```

9. Update the file permission to your username correctly. 
```
$ cd ~/macos/
$ sudo chown jason:jason mac_hdd_ng.img
$ chmod 664 mac_hdd_ng.img
```

10. Now start the container using the virtual disk, the local built naked image to finish the OS setup/configuration. It will takes more than 30 minutes to complete at least.

```
docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v "/home/jason/macos/mac_hdd_ng.img:/image" \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e MASTER_PLIST_URL=https://raw.githubusercontent.com/sickcodes/Docker-OSX/master/custom/config-nopicker-custom.plist \
    -e SHORTNAME=monterey \
    docker-osx:naked
```  
to speed up the container, add the below parameters to the command above if your host hardware support it.
```
    -m 10g \
    --cpus="8.0" \
    --gpus all \
    --device /dev/nvidia0 \
    --device /dev/nvidia-uvm \
    --device /dev/nvidia-uvm-tools \
    --device /dev/nvidiactl \
```

11. Once started, get the container id again. After the mac os setup/configuration is finish, then stop the container. Note that during this step, OS reboot is expected.

```
$ docker ps
```




12. Now every time to start the container
```
$ docker start <container id from step 11>
```




It is a pity that the macOS after Monterey does not work. If you managed to make it work, I would like to know and please contact me!

Saturday, March 28, 2026

๐Ÿ‡ฒ๐Ÿ‡พ A Simple, Fast EPF Calculator for Malaysians — Built for Everyday Use

 

๐Ÿ‡ฒ๐Ÿ‡พ A Simple, Fast EPF Calculator for Malaysians — Built for Everyday Use

Managing your finances in Malaysia often means keeping track of your EPF (Employees Provident Fund) contributions — whether you’re an employee, employer, or freelancer planning ahead.

That’s exactly why I built this lightweight, no-frills web app:

๐Ÿ‘‰ https://weetech-software.github.io/epf/


๐Ÿ’ก Why This EPF Calculator Exists

Most EPF calculators online tend to be:

  • Overly complex

  • Slow to load

  • Filled with ads or unnecessary steps

I wanted something different:

  • Fast

  • ๐Ÿงผ Clean UI

  • ๐ŸŽฏ Straight to the point

This tool is designed to help you quickly answer questions like:

  • How much EPF will I contribute this month?

  • What is my employer contributing?

  • What’s the total deduction from my salary?


๐Ÿงฎ What the Calculator Does

The calculator lets you:

  • Input your monthly salary

  • Instantly see:

    • Employee EPF contribution

    • Employer EPF contribution

    • Total EPF contribution

It reflects standard EPF contribution structures used in Malaysia, making it practical for:

  • Employees checking payslips

  • HR or payroll quick checks

  • Anyone planning savings projections


๐Ÿš€ Key Features

⚡ Instant Calculation

No loading screens, no waiting — results update immediately as you type.

๐Ÿง  Simple & Intuitive

No financial jargon. Just enter your salary and get your numbers.

๐Ÿ“ฑ Works Everywhere

Fully web-based, so you can use it on:

  • Desktop

  • Mobile

  • Tablet

No installation needed.

๐Ÿ”’ Privacy-Friendly

  • No login

  • No tracking

  • No data stored

Everything runs directly in your browser.


๐Ÿ› ️ Built for Practical Use

This isn’t meant to replace official tools — it’s meant to make your daily life easier.

Whether you’re:

  • Checking your take-home salary

  • Estimating job offers

  • Planning monthly finances

This tool gives you quick, reliable answers without friction.


๐Ÿ“Œ Example Use Case

Let’s say you’re offered a salary of RM5,000.

Instead of manually calculating percentages or digging through EPF tables, you can:

  1. Open the calculator

  2. Enter 5000

  3. Instantly see:

    • Your contribution

    • Employer contribution

    • Total EPF savings

Done in seconds.


๐ŸŒฑ Future Improvements

Some ideas I’m considering:

  • Support for different EPF contribution rates (e.g. reduced rates)

  • Yearly projection / savings growth

  • Printable summary

  • More financial tools in one place


๐Ÿ™Œ Try It Out

If you’re in Malaysia and want a quick way to calculate EPF:

๐Ÿ‘‰ https://weetech-software.github.io/epf/


๐Ÿ’ฌ Feedback Welcome

If you find it useful or have ideas to improve it, feel free to share feedback. The goal is to keep it simple, fast, and genuinely helpful.


Built with simplicity in mind — because financial tools shouldn’t be complicated.

Saturday, March 14, 2026

Integrate alert_threshold into Jenkins

To run this application periodically and ensure system admins/support receive timely alerts, a Jenkins installation is required.

  1. Make sure you have already run this app as described in the How to run this app section.
  2. Download and install Jenkins. While Jenkins setup is outside the scope of this document, more information can be found here.
  3. Create a Freestyle Project in Jenkins and apply the appropriate settings. The minimum required settings are:
    • Build periodically
    • Execute Shell
  4. That’s it! Check the console output for any errors. A YouTube video has also been created to briefly demonstrate this integration: