Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/docker/supabase-all-in-one container does not build #3099

Open
rwat17 opened this issue Mar 15, 2024 · 3 comments · May be fixed by #3214
Open

tools/docker/supabase-all-in-one container does not build #3099

rwat17 opened this issue Mar 15, 2024 · 3 comments · May be fixed by #3214
Assignees
Labels
bug Something isn't working good-first-issue Good for newcomers good-first-issue-300-advanced

Comments

@rwat17
Copy link
Contributor

rwat17 commented Mar 15, 2024

Describe the bug

Container crashing

To Reproduce

Any supabase version, any frozen-image-v2.sh version.
As described in readme run:
$docker-compose build && docker-compose up -d

///

add additional dependencies in Dockerfile
go \ dpkg \
in tools/docker/supabase-all-in-one/Dockerfile

replace
bash "${FREEZE_SCRIPT_PATH}" "${img_path}" "${img}"
with
bash -x "${FREEZE_SCRIPT_PATH}" "${img_path}" "${img}"
in tools/docker/supabase-all-in-one/src/freeze-images.sh

Optional (update to the newest version of freeze script)
And
https://raw.githubusercontent.com/moby/moby/dedf8528a51c6db40686ed6676e9486d1ed5f9c0/contrib/download-frozen-image-v2.sh
with
https://raw.githubusercontent.com/moby/moby/25.0/contrib/download-frozen-image-v2.sh
in tools/docker/supabase-all-in-one/src/freeze-images.sh

Expected behavior

Container builds and supabase dashboard/studio is available.

Logs/Stack traces

++ jq --raw-output .mediaType
+ mediaType=application/vnd.oci.image.index.v1+json
+ case "$mediaType" in
+ echo 'error: unknown manifest mediaType (supabase/postgres-meta:v0.68.0@v0.68.0): '\''application/vnd.oci.image.index.v1+json'\'''
error: unknown manifest mediaType (supabase/postgres-meta:v0.68.0@v0.68.0): 'application/vnd.oci.image.index.v1+json'
+ exit 1

Operating system name, version, build:

Linux 5.15.0-97-generic x86_64
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):

Either a semantic version of the release you are using such as 1.0.0 or a git
commit hash if you are directly working with code from the git repository.

Hyperledger Cactus Plugins/Connectors Used

Additional context

In my opinion there is a problem with download-froze-images-v2.sh script what does not handle "supabase/postgres-meta" mediaType manifest.

@rwat17 rwat17 added the bug Something isn't working label Mar 15, 2024
@solo-daemon
Copy link

solo-daemon commented Apr 8, 2024

@rwat17 @outSH I checked into this issue. Adding go and dpkg does resumes the process but it seems that some images from the tag of supabase that we are using have been discontinued like postgrest/postgrest:v9.0.1.20220717 so i tried to bump up the tag to the latest and few previous version but neither of the freeze script https://raw.githubusercontent.com/moby/moby/dedf8528a51c6db40686ed6676e9486d1ed5f9c0/contrib/download-frozen-image-v2.sh or https://raw.githubusercontent.com/moby/moby/25.0/contrib/download-frozen-image-v2.sh is compatible due to manifest mediatype issues. Finally i could run the script to the farthest was with tag v0.23.02 which ended with this

108.6 Use something like the following to load the result into a Docker daemon:
108.6   tar -cC '/opt/docker-freeze/supabase-realtime:v2.5.1' . | docker load
108.6 Freeze image 'supabase/storage-api:v0.28.2' in '/opt/docker-freeze/supabase-storage-api:v0.28.2
110.3 error: unknown manifest mediaType (supabase/storage-api:v0.28.2@v0.28.2): 'application/vnd.oci.image.index.v1+json'

Is there something I am missing?

@rwat17
Copy link
Contributor Author

rwat17 commented Apr 8, 2024

@solo-daemon you ran into same error as me when i was trying to solve this. I have tried to replace supabase versions and tags but there is a problem with certain container what is same in all the packages and pulls from dockerhub even in older versions. I think it was one with postgres image. I tried also using other freeze scripts, checked the code and none of them handles this exact media type. For now i dropped fixing this. You can use cloud based supabase or try to host it locally with official documentation but remember to extract keys and replace them because they are hard coded in examples at least.

@rwat17
Copy link
Contributor Author

rwat17 commented Apr 8, 2024

I was thinking about changing the code inside shell script to omit error and just freeze the image but have not tried that. Maybe you could do sth with that, but as far as i remember that was combined with changes in extensions and converting them to other etc...

@outSH outSH self-assigned this Apr 17, 2024
outSH added a commit to outSH/cactus that referenced this issue Apr 17, 2024
- Use latest supabase and container base versions.
- Use skopeo to freeze images, fetch the containers in separate build phase.
- Add anonymous volume definitions in dockerfile to speedup default runtime.

Closes hyperledger#3099

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this issue Apr 18, 2024
- Use latest supabase and container base versions.
- Use skopeo to freeze images, fetch the containers in separate build phase.
- Add anonymous volume definitions in dockerfile to speedup default runtime.

Closes hyperledger#3099

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
@outSH outSH linked a pull request Apr 18, 2024 that will close this issue
5 tasks
outSH added a commit to outSH/cactus that referenced this issue Apr 19, 2024
- Use latest supabase and container base versions.
- Use skopeo to freeze images, fetch the containers in separate build phase.
- Add anonymous volume definitions in dockerfile to speedup default runtime.

Closes hyperledger#3099

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue Good for newcomers good-first-issue-300-advanced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants