Attempting to prune containers on startup always.
This commit is contained in:
parent
618d8a5723
commit
21aba2fc71
|
@ -178,6 +178,7 @@ jobs:
|
|||
|
||||
- name: Pull testcontainers images
|
||||
run: |
|
||||
docker system prune -f
|
||||
if [ "${{ matrix.datasource }}" == "mssql" ]; then
|
||||
docker pull mcr.microsoft.com/mssql/server@${{ steps.dotenv.outputs.MSSQL_SHA }}
|
||||
elif [ "${{ matrix.datasource }}" == "mysql" ]; then
|
||||
|
|
|
@ -39,7 +39,6 @@ function getTestcontainers(): ContainerInfo[] {
|
|||
|
||||
function removeContainer(container: ContainerInfo) {
|
||||
execSync(`docker rm -f ${container.ID}`)
|
||||
execSync(`docker system prune -f`)
|
||||
}
|
||||
|
||||
export function getContainerByImage(image: string) {
|
||||
|
@ -55,7 +54,9 @@ export function getContainerByImage(image: string) {
|
|||
}
|
||||
|
||||
function getContainerByName(name: string) {
|
||||
return getTestcontainers().find(x => x.Names.includes(name))
|
||||
return getTestcontainers().find(x =>
|
||||
x.Names.toLowerCase().includes(name.toLowerCase())
|
||||
)
|
||||
}
|
||||
|
||||
export function getContainerById(id: string) {
|
||||
|
|
Loading…
Reference in New Issue