New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans to create a docker image? #248
Comments
This produces a bunch of FROM mcr.microsoft.com/dotnet/sdk:6.0.101-alpine3.14 as build
WORKDIR /build
COPY build/ build/
COPY src/ src/
RUN dotnet publish \
--configuration Release \
--framework net6.0 \
--runtime linux-x64 \
--self-contained \
-p:PublishSingleFile=true \
-p:PublishTrimmed=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
src/Evolve.Tool/Evolve.Tool.csproj
RUN dotnet publish \
--configuration Release \
--framework net6.0 \
--runtime linux-musl-x64 \
--self-contained \
-p:PublishSingleFile=true \
-p:PublishTrimmed=true \
-p:IncludeNativeLibrariesForSelfExtract=true \
src/Evolve.Tool/Evolve.Tool.csproj
FROM debian:11.2-slim as evolve-bullseye
RUN apt-get update && apt-get install -y --no-install-recommends libicu67 && rm -rf /var/lib/apt/lists/*
COPY --from=build /build/src/Evolve.Tool/bin/Release/net6.0/linux-x64/publish/Evolve.Tool /usr/local/bin/evolve
ENTRYPOINT [ "evolve" ]
FROM alpine:3.15 as evolve-alpine
RUN apk add --update --no-cache libgcc libstdc++ icu
COPY --from=build /build/src/Evolve.Tool/bin/Release/net6.0/linux-musl-x64/publish/Evolve.Tool /usr/local/bin/evolve
ENTRYPOINT [ "evolve" ] Build
Size
SQLite sample Set-StrictMode -Version Latest
$connection="Data Source=test.db;Version=3;"
docker run -it --rm `
--mount src="$(pwd)\db",target=/db,type=bind,readonly `
--mount src="$(pwd)\test.db",target=/test.db,type=bind `
evolve-alpine migrate sqlite -l db -c "$connection"
if (-not $?) { throw "Migrate failed" } |
Your example is good, but I am not sure I want to build from source. It would be nice to replace the build segments with a simple |
This example could help also: #253 (comment) |
@ctoestreich Usually you want to avoid
The Dockerfile I posted above is sub-optimal:
@lecaillon I did setup a test repo (.net hello world) to experiment with docker and github actions here: https://github.com/peterhirn/testing-actions. I was thinking about creating a PR for evolve, but have some questions:
|
Hey @peterhirn |
Hi. I would add this action https://github.com/peterhirn/testing-actions/blob/main/.github/workflows/docker.yaml to build and push docker images on release. This requires two additional files: The action produces images like https://hub.docker.com/r/peter87623/testing-actions/tags
|
Hi are there any plans to create a docker image of evolve, this would be awesome when running Continues deployments?
The text was updated successfully, but these errors were encountered: