0

This is my first time using Google Cloud and my first time using Docker so I am quite lost. I'm trying to set up my own Firefly III server on Google Cloud using this docker_compose.yml file from the project's documentation. I successfully built and started the service on my local machine first.

In accordance with the answer by @ayoub-bensakhria on this question, I created the following cloudbuild.yaml file:

  steps:
  # running docker-compose
  - name: 'docker/compose:1.26.2'
    args: ['up', '-d', '-f ./docker_compose.yml', '--pull=always']

However, when I run gcloud builds submit --config ./cloudbuild.yaml in the appropriate directory (all the files I need are in the same directory, no subdirectories), I get the following error:

ERROR: build step 0 "docker/compose:1.26.2" failed: step exited with non-zero status: 1

I tried replacing "docker/compose:1.26.2" with "docker/compose:latest" in the cloudbuild file with no success.

Oddly, if I run docker compose -f docker-compose.yml up -d --pull=always directly in the gcloud console, it builds successfully. Of course, then I can't actually access the container from my devices so that's useless.

Calibre
  • 13
  • 5
  • In the same answer it is mentioned Cloud Build is only for BUILDING. What's the purpose of using Cloud Build in your case? Where do you plan to deploy this? – Puteri Jul 03 '23 at 21:19
  • I just want to have this webapp up and running. Isn't Cloud Build where I go to build a Docker image, then deploy it in Cloud Run? – Calibre Jul 03 '23 at 23:25
  • You can build docker images there, nevertheless it doesn't make sense to run Docker composer in Cloud Build unless you want to test something. Moreover, Docker Compose can't run in Cloud Run https://stackoverflow.com/a/67195731/12265927 – Puteri Jul 03 '23 at 23:33
  • 1
    Ugh, thanks for saving me hours of frustration barking up the wrong tree. – Calibre Jul 04 '23 at 01:12

0 Answers0