{"record":{"id":"1499f506ad42d80a","repo":"quarkusio/quarkus","slug":"the-container-image-dockerimagename-requires-yo","errorCode":null,"errorMessage":"The container image ${dockerImageName} requires you to accept a license agreement. To accept, add the following to your Quarkus configuration: quarkus.devservices.license-acceptance=${dockerImageName}","messagePattern":"The container image (.+?) requires you to accept a license agreement\\. To accept, add the following to your Quarkus configuration: quarkus\\.devservices\\.license-acceptance=(.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/devservices/mssql/src/main/java/io/quarkus/devservices/mssql/deployment/MSSQLDevServicesProcessor.java","lineNumber":137,"sourceCode":"        private final String hostName;\n\n        public QuarkusMSSQLServerContainer(Optional<String> imageName, OptionalInt fixedExposedPort,\n                String defaultNetworkId, boolean useSharedNetwork) {\n            super(DockerImageName\n                    .parse(imageName.orElseGet(() -> ConfigureUtil.getDefaultImageNameFor(\"mssql\")))\n                    .asCompatibleSubstituteFor(MSSQLServerContainer.IMAGE));\n            this.fixedExposedPort = fixedExposedPort;\n            this.useSharedNetwork = useSharedNetwork;\n            this.hostName = ConfigureUtil.configureNetwork(this, defaultNetworkId, useSharedNetwork, \"mssql\");\n        }\n\n        @Override\n        protected void configure() {\n            try {\n                super.configure();\n            } catch (IllegalStateException e) {\n                if (e.getMessage() != null && e.getMessage().contains(\"license agreement\")) {\n                    throw new IllegalStateException(\n                            \"The container image \" + getDockerImageName()\n                                    + \" requires you to accept a license agreement.\"\n                                    + \" To accept, add the following to your Quarkus configuration:\"\n                                    + \" quarkus.devservices.license-acceptance=\" + getDockerImageName(),\n                            e);\n                }\n                throw e;\n            }\n\n            if (useSharedNetwork) {\n                return;\n            }\n\n            if (fixedExposedPort.isPresent()) {\n                addFixedExposedPort(fixedExposedPort.getAsInt(), MS_SQL_SERVER_PORT);\n            } else {\n                addExposedPort(MS_SQL_SERVER_PORT);\n            }","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/devservices/mssql/src/main/java/io/quarkus/devservices/mssql/deployment/MSSQLDevServicesProcessor.java#L119-L155","documentation":"This error is raised when the MSSQL dev services container fails to start because Testcontainers' MSSQLServerContainer enforces acceptance of the Microsoft SQL Server EULA. Quarkus catches the underlying IllegalStateException (whose message contains 'license agreement') and rethrows it with instructions on how to accept the license via configuration. It is a deliberate guardrail: running the MSSQL image legally requires ACCEPT_EULA=Y.","triggerScenarios":"Starting the MSSQL dev services container (dev mode or quarkus:test) without setting the license acceptance property; using an MSSQL image whose container init checks for the EULA environment variable.","commonSituations":"First-time use of quarkus-deavorservices-mssql; CI environments with a fresh container cache where no previous run accepted the EULA; switching to a different MSSQL docker image name that has its own license acceptance requirement.","solutions":["Add quarkus.devservices.license-acceptance=<dockerImageName> (e.g. mcr.microsoft.com/mssql/server:2022-latest) to application.properties","Or set the Testcontainers equivalent directly via quarkus.datasource.devservices.container-env.ACCEPT_EULA=Y","If you cannot accept the license, disable dev services (quarkus.datasource.devservices.enabled=false) and point to a real database via quarkus.datasource.jdbc.url"],"exampleFix":"// before\n# application.properties (no license acceptance)\nquarkus.datasource.devservices.enabled=true\n// after\nquarkus.devservices.license-acceptance=mcr.microsoft.com/mssql/server:2022-latest","handlingStrategy":"validation","validationCode":"String image = \"mcr.microsoft.com/mssql/server:2022-latest\";\nString accepted = ConfigProvider.getConfig().getValue(\"quarkus.devservices.license-acceptance\", String.class);\nif (!image.equals(accepted)) {\n    throw new IllegalArgumentException(\"Add quarkus.devservices.license-acceptance=\" + image);\n}","typeGuard":null,"tryCatchPattern":"try {\n    devServicesResult = mssqlProcessorStart(...);\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"license agreement\")) {\n        log.error(\"Accept the MSSQL EULA: quarkus.devservices.license-acceptance=\" + imageName);\n    } else throw e;\n}","preventionTips":["Always set quarkus.devservices.license-acceptance for MSSQL in shared configs","Commit the license acceptance property to the repository so CI inherits it","Keep the accepted value in sync with the devservices image name"],"tags":["devservices","mssql","license","testcontainers"],"backgroundTag":"container-license-not-accepted","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}