{"id":"7d58ad704de38e2c","repo":"typeorm/typeorm","slug":"you-cannot-initialize-a-project-with-docker-for-or","errorCode":null,"errorMessage":"You cannot initialize a project with docker for Oracle driver yet.","messagePattern":"You cannot initialize a project with docker for Oracle driver yet\\.","errorType":"exception","errorClass":"TypeORMError","httpStatus":null,"severity":"error","filePath":"src/commands/InitCommand.ts","lineNumber":633,"sourceCode":"      POSTGRES_PASSWORD: \"password\"\n      POSTGRES_DB: \"typeorm\"\n\n`\n            case \"cockroachdb\":\n                return `services:\n\n  cockroachdb:\n    image: \"cockroachdb/cockroach:v25.1.2\"\n    command: start --insecure\n    ports:\n      - \"26257:26257\"\n\n`\n            case \"better-sqlite3\":\n                throw new TypeORMError(`SQLite does not require docker`)\n\n            case \"oracle\":\n                throw new TypeORMError(\n                    `You cannot initialize a project with docker for Oracle driver yet.`,\n                ) // todo: implement for oracle as well\n\n            case \"mssql\":\n                return `services:\n\n  mssql:\n    image: \"mcr.microsoft.com/mssql/server:2022-latest\"\n    ports:\n      - \"1433:1433\"\n    environment:\n      SA_PASSWORD: \"Admin12345\"\n      ACCEPT_EULA: \"Y\"\n      MSSQL_PID: \"Express\"\n\n`\n            case \"mongodb\":\n                return `services:","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/typeorm/typeorm/blob/04ff4daedcf60fa4ffd0d5d33bbafaac1a9bbc96/src/commands/InitCommand.ts#L615-L651","documentation":"Thrown by InitCommand's docker-compose template generator for the 'oracle' case. Docker-based Oracle scaffolding has not been implemented (the code carries a TODO), so requesting --docker with the oracle driver is explicitly rejected rather than emitting an incomplete compose file.","triggerScenarios":"Running `typeorm init --db oracle --docker` which routes the oracle case into the docker-compose template generator.","commonSituations":"Wanting a local Oracle dev container via the init scaffold; following a uniform --docker workflow across drivers; not realising Oracle docker support is pending in the generator.","solutions":["Drop --docker and provide Oracle connection details manually (host/port/sid) to an existing Oracle instance.","Provide your own docker-compose for Oracle (e.g. gvenzl/oracle-xe image) and skip the built-in docker generation.","Watch for / upgrade to a typeorm version that implements Oracle docker scaffolding."],"exampleFix":"// before\n$ typeorm init --db oracle --docker\n// You cannot initialize a project with docker for Oracle driver yet.\n\n// after\n$ typeorm init --db oracle   # then add Oracle to compose manually","handlingStrategy":"validation","validationCode":"const DOCKER_UNSUPPORTED = ['better-sqlite3', 'oracle'] as const\nconst dockerSupported = (db: string): boolean => !(DOCKER_UNSUPPORTED as readonly string[]).includes(db)","typeGuard":"const canInitWithDocker = (db: string): boolean => db !== 'better-sqlite3' && db !== 'oracle'","tryCatchPattern":null,"preventionTips":["Do not combine --docker with oracle in `typeorm init`.","Provide Oracle containers via your own docker-compose."],"tags":["cli","init","oracle","docker","not-implemented"],"analyzedSha":"04ff4daedcf60fa4ffd0d5d33bbafaac1a9bbc96","analyzedAt":"2026-08-03T18:27:32.281Z","schemaVersion":2}