I would like to deploy an application to a remote server by using docker-compose with a remote context, following this tutorial.
The Dockerfile
contains
FROM ubuntu
The docker-compose.yml
contains
version: "3.8"
services:
ubuntu_test:
build: .
The remote context remote
is set as ssh://root@host
When I run docker-compose --context remote up
, it crashes with the following error message
runtime/cgo: pthread_create failed: Resource temporarily unavailable
runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
PC=0x7fb21d93bfb7 m=3 sigcode=18446744073709551610
goroutine 0 [idle]:
runtime: unknown pc 0x7fb21d93bfb7
stack: frame={sp:0x7fb21aee9840, fp:0x0} stack=[0x7fb21a6ea288,0x7fb21aee9e88)
[...]
ERROR: Couldn't connect to Docker daemon at http+docker://ssh - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
What is already working
- Copying the source code to the remote server, logging in and running
docker-compose up
- Unpacking
docker-compose
into the correspondingdocker
commandsdocker --context remote build .
: worksdocker --context remote run ubuntu
: works
- Using
docker-compose --context remote build
on the local machine to build the images on the remote server
In summary, everything works except for docker-compose --context remote up
and I can't for the live of me figure out why. Everything I got is this cryptic error message (but obviously, Docker is running on the remote server, otherwise docker
with remote context would fail).
Edit: My problem can be reduced to: What is the difference between docker --context remote run ubuntu
and docker-compose --context remote up
(as defined in my case)?