Skip to content

Commit

Permalink
Fix some stuff, add configure.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
33KK committed Sep 11, 2023
1 parent 5c64eb7 commit ab1b5ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
username: ${{github.repository_owner}}
password: ${{github.token}}

- name: Log In to DockerHub
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RUN RUSTFLAGS="$(cat /flags.txt)" cargo build --target "$(cat /target.txt)" --re
RUN mv "/build/target/$(cat /target.txt)/release" "/output"

FROM docker.io/debian:bookworm-slim
ENV STALWART_COMPONENT=all-in-one
WORKDIR /opt/stalwart-mail
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
Expand All @@ -32,6 +33,7 @@ COPY --from=builder /output/stalwart-mail /usr/local/bin
COPY --from=builder /output/stalwart-cli /usr/local/bin
COPY --from=builder /output/stalwart-install /usr/local/bin
COPY ./resources/docker/entrypoint.sh /usr/local/bin
COPY ./resources/docker/configure.sh /usr/local/bin
RUN chmod -R 755 /usr/local/bin
CMD ["/usr/local/bin/stalwart-mail"]
ENTRYPOINT ["/usr/local/bin/entrypoint.sh", "/opt/stalwart-mail/etc/config.toml"]
4 changes: 4 additions & 0 deletions resources/docker/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
# shellcheck shell=dash

exec /usr/local/bin/stalwart-install --docker --component "$STALWART_COMPONENT" --path /opt/stalwart-mail "$@"

0 comments on commit ab1b5ee

Please sign in to comment.