Skip to content

Question: Can I cache a docker image #878

@dbogdoll

Description

@dbogdoll

What are you trying to do?

I have a docker image which is based on postgres, but contains
additional some (large) *.sql files in /docker-entrypoint-initdb.d/ .

When the docker container is started, it will import the sql files.
This will delay the startup time until I can access the docker image for testing.

I assume that when I use testcontainers it is similiar to the call

docker run --rm

in the sense, that after the container was used, it is thrown away.

Is it possible to tell testcontainers to cache the container, so the next time I use that image the
database is already initialized?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions