Welcome to the Evolve Docker image repository by MFedatto! This project provides a Docker container for Evolve, a database migration tool. With this Docker image, you can seamlessly integrate Evolve into your CI/CD pipeline and manage database migrations in a standardized environment.
The EvolveDB Docker image allows you to run EvolveDB commands in a containerized environment, ensuring consistency across different development, testing, and production setups. This image is built on the .NET runtime and includes Evolve to handle your database migrations efficiently.
To get started, pull the Docker image from Docker Hub:
docker pull mfedatto/evolve-db
To run the container and perform database migrations, use the following command. Make sure to replace the placeholders with your actual values:
docker run --rm \
-e CONNECTION_STRING="your_connection_string" \
-e LOCATIONS="/path/to/migrations" \
-e DBMS="your_dbms" \
-e COMMAND="migrate" \
-e SCHEMA="optional_schema" \
-e PLACEHOLDERS="key1=value1;key2=value2" \
-e METADATA_TABLE="optional_metadata_table" \
mfedatto/evolve-db
Here are the environment variables you can use to configure the EvolveDB Docker container:
CONNECTION_STRING
: Your database connection string. (Required)LOCATIONS
: Paths to the migration scripts. (Required)DBMS
: The type of database system (e.g., sqlserver
, postgres
). (Required)COMMAND
: The EvolveDB command to execute (e.g., migrate
). (Required)SCHEMA
: Optional schema for the database.PLACEHOLDERS
: Key-value pairs for placeholders in migration scripts. (Format: key1=value1;key2=value2
)METADATA_TABLE
: Optional table name for metadata tracking.Here’s an example of running the Docker container with all environment variables:
docker run --rm \
-e CONNECTION_STRING="Server=myServerAddress;Database=myDataBase;UID=myUsername;PWD=myPassword;" \
-e LOCATIONS="/migrations" \
-e DBMS="sqlserver" \
-e COMMAND="migrate" \
-e SCHEMA="dbo" \
-e PLACEHOLDERS="env=production;version=1.0" \
-e METADATA_TABLE="evolve_metadata" \
mfedatto/evolve-db
If you wish to build the Docker image yourself, you can use the provided Dockerfile
:
git clone https://github.com/mfedatto/evolvedb-docker.git
cd evolvedb-docker
docker build -t mfedatto/evolve-db .
Contributions are welcome! If you have suggestions or improvements, please submit a pull request or open an issue on GitHub. For a list of contributors who have helped with this project, check out the CONTRIBUTORS.md.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or support, please open an issue on the GitHub repository or contact us via the repository’s discussions.