LIRC is hard, clunky and not very web friendly. This docker will stand up a webservice to send commands to LIRC via a simple curl command.
echo 'lirc_dev' >> /etc/modules
echo 'lirc_rpi gpio_in_pin=18 gpio_out_pin=17' >> /etc/modules
echo 'dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17' >> /boot/config.txt
Change the pin number to reflect your hardware setup.
Visit the web interface at http://pi:8080.
#http://pi:8080/api/<cmd_code>
curl http://pi:8080/api/KEY_POWER
docker build -t blgulla/rpi-lirc .
docker run --rm -t \
-p 8080:8080 -p 9001:9001 \
-v ${PWD}/conf/hardware.conf:/etc/lirc/hardware.conf \
-v ${PWD}/conf/lircd.conf:/etc/lirc/lircd.conf \
--privileged bgulla/rpi-lirc