Skip to content

cboudereau/docker-sybase

Repository files navigation

docker-sybase

build License:MIT docker

Sybase docker image for local dev only.

⚠️ This image is not production ready and should be used for dev only

For a dev usage a licence should be used and mounted in the container. The docker image is only valid for a short period.

Run as docker container

docker run --rm -it --name sybase -e SA_PASSWORD=Sybase1234 -e DATABASE=hello -p 5000:5000 -v $(pwd)/init/:/docker-entrypoint-initdb.d/ superbeeeeeee/docker-sybase

Docker compose example

services:
  database:
    image: superbeeeeeee/docker-sybase
    pull_policy: always
    environment:
      - DATABASE=hello
      - SA_PASSWORD=Sybase1234
    volumes:
      - ./init/:/docker-entrypoint-initdb.d/
    ports:
      - 5000:5000
    healthcheck:
      test: healthcheck
      interval: 5s

isql demo

run the docker-compose example: basic example

1️⃣ Run the demo

cd examples/basic/
docker compose down --remove-orphans -v --rmi local && docker compose up

2️⃣ Run a basic query

. /opt/sap/SYBASE.sh && echo -e "select top 10 * from TEST_TABLE\ngo" | isql -Usa -P${SA_PASSWORD} -D${DATABASE}

3️⃣ Run isql

docker compose exec -it database sh
. /opt/sap/SYBASE.sh
isql -Usa

show databases

sp_helpdb
go

describe database

sp_helpdb TESTDB
go

show tables

use TESTDB
go
sp_tables
go

describe table

sp_help TEST_TABLE
go