diff --git a/Dockerfile b/Dockerfile index 38ebd3f..95d6dbf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,24 @@ FROM casjaysdevdocker/alpine:latest as source -RUN apk --no-cache add --update cargo rust && \ - git clone --recurse-submodules https://github.com/denoland/deno.git /build && \ - cd /build && cargo cargo clean && cargo build -vv && ./target/release/deno --version || exit 10 +SHELL [ "/bin/bash" ] +ARG VERSION="v1.23.3" + +RUN apk --no-cache add --update \ + cargo \ + rust && \ + mkdir -p /tmp/deno + +RUN { [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; } && \ + curl -Lsf "https://github.com/denoland/deno/releases/download/${VERSION}/deno-x86_64-unknown-linux-gnu.zip" -o /tmp/deno.zip + +RUN { [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; } && \ + curl -Lsf https://github.com/LukeChannings/deno-arm64/releases/download/${VERSION}/deno-$(echo $TARGETPLATFORM | tr '/' '-').zip -o /tmp/deno.zip + +RUN cd /tmp/deno && \ + unzip /tmp/deno.zip && \ + mv -fv /tmp/deno/deno /usr/bin/deno && \ + chmod +x /usr/bin/deno && \ + rm /tmp/deno.zip /tmp/deno COPY ./bin/. /usr/local/bin/ COPY ./config/. /config/ @@ -34,13 +50,12 @@ ENV SHELL="/bin/bash" \ HOSTNAME="casjaysdev-deno" \ TZ="${TZ:-America/New_York}" -WORKDIR /root -VOLUME ["/root","/config"] -EXPOSE 9090 +WORKDIR /app +VOLUME ["/app","/config","/data"] +EXPOSE 1993 COPY --from=build /. / HEALTHCHECK CMD [ "/usr/local/bin/entrypoint-deno.sh", "healthcheck" ] ENTRYPOINT [ "/usr/local/bin/entrypoint-deno.sh" ] CMD [ "/usr/bin/bash", "-l" ] -