Posts

Showing posts with the label alpine

Go-compiled binary won't run in an alpine docker container on Ubuntu host

Go-compiled binary won't run in an alpine docker container on Ubuntu host Given a binary, compiled with Go using GOOS=linux and GOARCH=amd64 , deployed to a docker container based on alpine:3.3 , the binary will not run if the docker engine host is Ubuntu (15.10): GOOS=linux GOARCH=amd64 docker alpine:3.3 sh: /bin/artisan: not found This same binary (compiled for the same OS and arch) will run just fine if the docker engine host is busybox (which is the base for alpine ) deployed within a VirtualBox VM on Mac OS X. busybox alpine This same binary will also run perfectly fine if the container is based on one of Ubuntu images. Any idea what this binary is missing? This is what I've done to reproduce (successful run in VirtualBox/busybox on OS X not shown): Build (building explicitly with flags even though the arch matches): ➜ artisan git:(master) ✗ GOOS=linux GOARCH=amd64 go build Check it can run on the host: ➜ artisan git:(master) ✗ ./artisan 10:14:04.925 [ERROR] artisan:...

Unable to restart php-fpm in alpine linux nginx docker image

Unable to restart php-fpm in alpine linux nginx docker image I am trying to get php to work on the official nginx alpine linux docker image nginx:alpine . At the entrypoint of the container, I am running a script that does something like: nginx:alpine rc-service -v php-fpm7 restart && nginx-debug -g "daemon off;" rc-service -v php-fpm7 restart && nginx-debug -g "daemon off;" but alpine linux keeps on showing WARNING: php-fpm7 is already starting I have also tried executing inside the container rc-service -v php-fpm7 stop and then rc-service -v php-fpm7 start , but I get pretty much the same error: rc-service -v php-fpm7 stop rc-service -v php-fpm7 start ERROR: php-fpm7 stopped by something else WARNING: php-fpm7 is already starting after doing this a random number of times, I get: /lib/rc/sh/openrc-run.sh: line 273: can't create /sys/fs/cgroup/blkio/tasks: Read-only file system /lib/rc/sh/openrc-run.sh: line 273: can't create /sys/fs/cgrou...