Closed EvanKrall closed 2 years ago
This has to do with Crystal >= 1.6.0 and Kemal < 1.3.0. Try using the Dockerfile from the main branch (which uses crystallang/crystal:1.2.2-alpine
instead of crystal:latest-alpine
).
i will also fix this in the v1.0.0 branch.
i've fixed this in main and in dist. (i'm not going to fix the Dockerfile in the v1.0.0 tag/branch because there are some library issues i've uncovered that i haven't been able to troubleshoot.)
if someone confirms docker build now works i'll close this issue.
@EvanKrall thank you for reporting it!
successfully built 2.0.0-1, 2.0.0-2 & 2.0.0-3 from the dist
branch with the provided Dockerfile
(note: 2.0.0-3 required below changes, since there was something wrong with the shards.lock
, but that is a different problem entirely)
diff --git a/Dockerfile b/Dockerfile
index 3da5a26..731c3a6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,8 @@ RUN apk update && apk upgrade && apk add sqlite-static
WORKDIR /build/
ARG version
RUN git clone --branch ${version:-dist} --depth 1 https://github.com/toddsundsted/ktistec .
-RUN shards install --production
+#RUN shards install --production
+RUN shards update
RUN crystal build src/ktistec/server.cr --static --no-debug --release
FROM alpine:latest AS server
I can also confirm that adding RUN shards update
to my Dockerfile seems to fix the shards.lock issue, so the build succeeds.
thanks all!
Steps to reproduce:
Docker build output:
Possibly related to https://github.com/kemalcr/kemal/issues/648?