Sorry for the very very late response. We had been using postgres since i had last responded and nwo we are looking into msslq again.
Then from within the docker image created the "hapi" db and verified it exixts.
These settings are what I have in my docker for the jpaserver image for local testing
hapi-fhir-jpaserver-start:
image: "hapiproject/hapi:v6.6.0"
container_name: hapi-fhir-jpaserver-start
restart: on-failure
ports:
- "8080:8080"
environment:
# spring.datasource.url: 'jdbc:postgresql://hapi-fhir-postgres:5432/hapi'
spring.datasource.url: 'jdbc:sqlserver://localhost:1433;databaseName=hapi'
spring.datasource.username: sa
spring.datasource.password: SQLDefaultPassword123
spring.datasource.driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.jpa.properties.hibernate.dialect: org.hibernate.dialect.SQLServer2012Dialect
# hapi.fhir.fhir_version: R4
# hapi.fhir.bulk_export_enabled: true
# hapi.fhir.bulk_import_enabled: true
I have also tried "localhost/sql42" and just "sql42"
but i get this same error when the container runs:
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall."
I am able to connect to the sql server from outside docker with Microsoft SQL Server Management Studio with these setting:

I am not sure what I am missing in these settings to get it to connect. Any help would be appriciated.