Skip to content

Error occurred after transferring docker images to another device. #1205

@Mojy0715

Description

@Mojy0715

I am trying to transfer docker image built from my laptop to another computer without internet connect.

The way I have done it:

  1. Building the image on my laptop.
  2. docker save to get the .tar file of the image
  3. Copy the .tar file into a USB flash drive
  4. Connect USB flash drive and copy the .tar file to the other computer without internet connection
  5. docker run image
  6. docker exec -it [CONTAINER ID] psql -U postgres (I have not changed any config, other than setting either POSTGRES_PASSWORD=password or POSTGRES_HOST_AUTH_METHOD=trust for testing)

and I got psql: error: connection to server on socket "/var/run/postgresl/.s.PGSQL.5432" failed: FATAL: could not find tuple for opclass 1981. The postgres container running on my laptop is working fine.

docker logs does not show anything particular:

PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-03-04 08:07:24.039 UTC [1] LOG:  starting PostgreSQL 15.6 (Debian 15.6-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-03-04 08:07:24.039 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-03-04 08:07:24.039 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-03-04 08:07:24.046 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-03-04 08:07:24.054 UTC [29] LOG:  database system was shut down at 2024-03-04 06:54:42 UTC
2024-03-04 08:07:24.061 UTC [1] LOG:  database system is ready to accept connections
2024-03-04 08:07:35.052 UTC [40] ERROR:  could not find tuple for opclass 1981

also I installed docker & docker compose on the computer without internet connection through dpkg -i with the packages I got from https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/

Please do enlighten me. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions