Search code examples
dockerdocker-composesybase

How to create a docker-compose to Sybase


Im trying to create a docker-compose with db2, sql-server and sybase but I have a problem. When I run

docker-compose up

This get this error:

Creating sybase ... error
Creating db2 ... 
Creating mssql ... done
ERROR: for sybase  Cannot create container for service sybase: No command specified

This is my docker-compose.yml:

version: '3'
services:
  db2:
    container_name: db2
    privileged: true
    image: "ibmcom/db2express-c:latest"
    environment:
      LICENSE: accept
      DB2INST1_PASSWORD: "abcd.1234"
    ports:
    - "50000:50000"
  mssql:
    container_name: mssql
    image: "microsoft/mssql-server-linux:latest"
    environment:
      SA_PASSWORD: "abcd.1234"
      ACCEPT_EULA: "Y"
    ports:
    - "1433:1433"
  sybase:
    container_name: sybase
    image: "ifnazar/sybase_15_7:latest"
    ports:
        - "5000:5000"
    hostname: dksybase hostname: dksybase

The configuration of db2 and sql-server it's ok. The only problem is Sybase! The only information of sybase where I found in forums is Dockerfile, but by now, I dont need create a new image. I only need a docker-compose file with their configuration.

I hope you can help me! Thanks a lot!


Solution

  • By inspecting ifnazar/sybase_15_7 image documentation I can tell that it requires a command as you can see by the error message. Simply add one to the docker-compose file:

    sybase:
      (...)
      command: ["bash", "/sybase/start"]