Skip to content

Error: Unknown OS in postgres #6

Closed

Description

@xmlking

please advice if there is any issues with my docker-compose.yml

 container-compose up
Info: No 'name' field found in docker-compose.yml. Using directory name as project name: astra
Stopping container: astra-postgres

--- Processing Services ---
["postgres"]
Pulling Image timescale/timescaledb:latest-pg17...
Error: invalidArgument: "Unknown OS in postgres"
services:
  ###########################################################################
  # postgres database
  ###########################################################################
  postgres:
    image: timescale/timescaledb:latest-pg17
    hostname: postgres
    container_name: postgres
    restart: unless-stopped
    environment:
        POSTGRES_DB: postgres
        POSTGRES_PASSWORD: postgres
        POSTGRES_USER: postgres
        WAL_LEVEL: logical
        MAX_REPLICATION_SLOTS: "10"
        MAX_WAL_SENDERS: "10"
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB -q']
      interval: 60s
      start_period: 1m
      start_interval: 10s
      timeout: 15s
      retries: 5
    ports:
      - '5432:5432'
    volumes:
        # - type: volume
        #   source: pg_data
        #   target: /var/lib/postgresql/data
        #   read_only: false
        - ./infra/db/init-database.sh:/docker-entrypoint-initdb.d/init-data.sh:Z
###########################################################################
# volumes
###########################################################################
# volumes:
#   pg_data: {}

Activity

  1. changed the title [-]Error ; Unknown OS in postgres[/-] [+]Error: Unknown OS in postgres[/+] on Sep 14, 2025
  2. Mcrich23 commented on Sep 14, 2025

    @Mcrich23
    Owner

    My guess is that it can't find the image timescale/timescaledb:latest-pg17

  3. xmlking commented on Sep 14, 2025

    @xmlking
    Author

    i did pull with container image pull ahead !

  4. Mcrich23 commented on Sep 14, 2025

    @Mcrich23
    Owner

    hmmm, then I don't know. If you want to invite me to the project or send me a copy ([email protected]), I would be happy to do some debugging.

  5. self-assigned this
    on Sep 14, 2025
  6. xmlking commented on Sep 15, 2025

    @xmlking
    Author

    can you please test by creating docker-compose.yml file with below content , then run container-compose up

    I tested with just docker-compose.yml and .env and got error

    services:
      ###########################################################################
      # postgres database
      ###########################################################################
      postgres:
        image: timescale/timescaledb:latest-pg17
        hostname: postgres
        container_name: postgres
        restart: unless-stopped
        environment:
            POSTGRES_DB: postgres
            POSTGRES_PASSWORD: postgres
            POSTGRES_USER: postgres
            WAL_LEVEL: logical
            MAX_REPLICATION_SLOTS: "10"
            MAX_WAL_SENDERS: "10"
        healthcheck:
          test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB -q']
          interval: 60s
          start_period: 1m
          start_interval: 10s
          timeout: 15s
          retries: 5
        ports:
          - '5432:5432'
        volumes:
            # - type: volume
            #   source: pg_data
            #   target: /var/lib/postgresql/data
            #   read_only: false
            - ./infra/db/init-database.sh:/docker-entrypoint-initdb.d/init-data.sh:Z
    ###########################################################################
    # volumes
    ###########################################################################
    # volumes:
    #   pg_data: {}
  7. Mcrich23 commented on Sep 15, 2025

    @Mcrich23
    Owner

    sure, but I need help resolving ./infra/db/init-database.sh:/docker-entrypoint-initdb.d/init-data.sh:Z

  8. xmlking commented on Sep 15, 2025

    @xmlking
    Author

    You can comment out that line

  9. xmlking commented on Sep 15, 2025

    @xmlking
    Author

    I had this in that file

    #!/bin/bash
    set -e
    
    psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_USER" <<-EOSQL
      -- CREATE EXTENSION IF NOT EXISTS "pg_uuidv7";
      -- CREATE EXTENSION IF NOT EXISTS timescaledb;
      CREATE EXTENSION IF NOT EXISTS vector WITH SCHEMA PUBLIC;
      -- ALTER EXTENSION timescaledb UPDATE;
    	SELECT * FROM PG_EXTENSION;
      -- set custom config
    	-- ALTER DATABASE postgres SET custom.secret_key=${SECRET_KEY}";
    	-- set system config
    	-- ALTER SYSTEM SET wal_level = logical;
    	-- ALTER SYSTEM SET max_wal_senders = 5;
    	-- ALTER SYSTEM SET max_replication_slots = 5;
    EOSQL
    
  10. added
    bug
    on Oct 6, 2025
  11. tauu commented on Oct 14, 2025

    @tauu

    After running into the issue and investigating it for a bit, I think the error is this line

    try await pullImage(img, platform: service.container_name)

    The container_name property is passed as the value for the platform, although this property does not contain any platform information. I assume passing the platform property instead fixes the issue.

    A workaround is to just remove the container_name from the compose file.

  12. Mcrich23 commented on Oct 14, 2025

    @Mcrich23
    Owner

    Thank you! That should be a valid workaround for the moment, but I will create a pull request fixing this by changing it to actually pass in the platform instead of container_name.

  13. linked a pull request that will close this issueFix: Platform specific Image Pulling #13on Oct 14, 2025
  14. tauu commented on Oct 14, 2025

    @tauu

    oh that was a fast fix, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions