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

Developer Docker Compose not working properly #3335

Closed
EshaanAgg opened this issue Dec 5, 2023 · 3 comments
Closed

Developer Docker Compose not working properly #3335

EshaanAgg opened this issue Dec 5, 2023 · 3 comments
Labels
needs: troubleshooting Issues that we can't reproduce or need to investigate further before picking a course of action needs: user feedback We are waiting for a user to answer questions or provide feedback on our fix type: bug Something isn't working work: docker Related to our production or development docker setup

Comments

@EshaanAgg
Copy link

Description

I was trying to setup the local development environment for Mathesar using the provided DEVELOPER_GUIDE.md. According to the same I ran the docker compose -f docker-compose.yml -f docker-compose.dev.yml up dev-service to setup the web server and the database, but instead I received the following error:

=> CACHED [dev-service  2/13] RUN set -eux;                                                                                                              0.0s
 => CACHED [dev-service  3/13] RUN mkdir -p /etc/apt/keyrings;                                                                                            0.0s
 => CACHED [dev-service  4/13] RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - ;     echo "deb http://apt.postgresql.org/pub  0.0s
 => CACHED [dev-service  5/13] RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.  0.0s
 => CACHED [dev-service  6/13] RUN apt-get update &&     apt-get install -y --no-install-recommends         sudo         ca-certificates         curl     0.0s
 => CACHED [dev-service  7/13] RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8                                           0.0s
 => ERROR [dev-service  8/13] RUN apt-get update &&     apt-get install -y --no-install-recommends         postgresql-15 postgresql-client-15 postgresql  3.2s
------
 > [dev-service  8/13] RUN apt-get update &&     apt-get install -y --no-install-recommends         postgresql-15 postgresql-client-15 postgresql-contrib-15     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
0.373 Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
0.410 Get:2 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]
0.416 Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
0.560 Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7,909 kB]
0.616 Get:5 https://deb.nodesource.com/node_18.x nodistro InRelease [12.1 kB]
1.007 Get:6 https://deb.nodesource.com/node_18.x nodistro/main amd64 Packages [6,262 B]
1.066 Get:7 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease [149 kB]
1.680 Err:7 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease
1.680   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
1.953 Get:8 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [575 kB]
2.037 Get:9 http://deb.debian.org/debian buster-updates/main amd64 Packages [8,788 B]
2.704 Reading package lists...
3.075 W: GPG error: http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8
3.075 E: The repository 'http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease' is not signed.
------
failed to solve: process "/bin/sh -c apt-get update &&     apt-get install -y --no-install-recommends         postgresql-$PG_MAJOR postgresql-client-$PG_MAJOR postgresql-contrib-$PG_MAJOR     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" did not complete successfully: exit code: 100

Expected behavior

The server should start without any errors.

To Reproduce

Run the developer docker-compose instruction on a fresh pull of the repository.

Environment

  • OS: Cinnamon
  • Browser: Brave
  • Browser 1.60.125
  • Other info: NA

Additional context

image

@EshaanAgg EshaanAgg added status: triage type: bug Something isn't working labels Dec 5, 2023
@seancolsen seancolsen added needs: troubleshooting Issues that we can't reproduce or need to investigate further before picking a course of action work: docker Related to our production or development docker setup and removed status: triage labels Dec 5, 2023
@seancolsen
Copy link
Contributor

@mathemancer @pavish @kgodey @Anish9901 would any of you be able to help troubleshoot this?

@Anish9901
Copy link
Member

Hey @EshaanAgg, I wasn't able to reproduce this locally, but from what I can tell from the logs your setup failed the first time you tried to execute the command and therefore docker is now using a cached version of already pulled layers for setup. I would recommend you to try the solutions from this SO article that deals with the problem you are facing.

@seancolsen seancolsen added the needs: user feedback We are waiting for a user to answer questions or provide feedback on our fix label Dec 6, 2023
@EshaanAgg
Copy link
Author

@Anish9901
Thanks for the reply. It turns out I had a postgres-15 image already installed on my docker cache, which somehow conflicted with the current one being pulled. I ran docker system prune -a to reset all the images and caches; and then built a fresh image with the provided command, and it all worked smoothly!

Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: troubleshooting Issues that we can't reproduce or need to investigate further before picking a course of action needs: user feedback We are waiting for a user to answer questions or provide feedback on our fix type: bug Something isn't working work: docker Related to our production or development docker setup
Projects
No open projects
Development

No branches or pull requests

3 participants