I’m trying to set up a custom service to run along side my tests and I’m failing to connect the dots. I have a drone.yml that looks something like this:
pipeline: test: image: anonymized/drone-base:latest commands: - python -c "import socket; sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM); print sock.connect_ex(('127.0.0.1', 8077))" services: datastore: image: anonymized/datastore-emulator:latest
The Dockerfile for the datastore-emulator image looks like this:
FROM anonymized/drone-base:latest RUN apt-get install -y default-jre # Running the emulator requires this ENV CLOUDSDK_CORE_PROJECT anonymized RUN gcloud components install beta cloud-datastore-emulator --quiet ENTRYPOINT ["gcloud"] CMD ["beta", "emulators" ,"datastore", "start", "--consistency=1.0", "--no-store-on-disk", "--host-port=127.0.0.1:8077"]
As far as I can tell, this image runs fine in a container. Drone shows datastore service started at 127.0.0.1:8077 but somehow it is not accessible. My poor man’s port probe above is supposed to verify that. This gives me a 111 socket response (connection refused).
What am I missing? Are there any particular requirements for how the service container should be set up? Anything about the network setup I should know?