feat(docker): include license artifacts in Docker image

- Ensure `LICENSE` and `license.html` are included in build artifacts
- Extracted build output into `docker/` as Docker context
- Updated Dockerfile to COPY `LICENSE` and `license.html` into image
- License list generated from accepted SPDX identifiers
This commit is contained in:
rustmailer
2025-07-28 21:41:21 +08:00
parent 7e797562a3
commit fa0c5cb66b
6 changed files with 20678 additions and 3 deletions
+2 -1
View File
@@ -95,7 +95,7 @@ jobs:
run: |
mkdir -p release
BINARY="target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}"
cp README.md LICENSE release/
cp README.md LICENSE license.html release/
cp "$BINARY" release/
tar -czvf "${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" -C release .
mv "${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" release/
@@ -116,6 +116,7 @@ jobs:
Copy-Item -Path $BINARY -Destination release/
Copy-Item -Path README.md -Destination release/
Copy-Item -Path LICENSE -Destination release/
Copy-Item -Path license.html -Destination release/
Compress-Archive -Path release\* -DestinationPath "release/${{ env.BINARY_NAME }}-${{ github.ref_name }}-${{ matrix.target }}.zip" -Force
- name: Upload build artifact
+1 -1
View File
@@ -150,7 +150,7 @@ It does **not rely on real-time push**, but instead performs full or incremental
Mail events are then emitted as:
RustMailer detects mail changes (e.g. new messages, flag updates, etc.) by periodically scanning IMAP folders.
It performs either **full** or **incremental synchronization**, depending on configuration.
It performs either **full** or **incremental synchronization**, depending on configuration. see details [`https://rustmailer.com/docs/guide/imap-sync`](https://rustmailer.com/docs/guide/imap-sync)
Detected events can be forwarded using:
+70
View File
@@ -0,0 +1,70 @@
<html>
<head>
<style>
@media (prefers-color-scheme: dark) {
body {
background: #333;
color: white;
}
a {
color: skyblue;
}
}
.container {
font-family: sans-serif;
max-width: 800px;
margin: 0 auto;
}
.intro {
text-align: center;
}
.licenses-list {
list-style-type: none;
margin: 0;
padding: 0;
}
.license-used-by {
margin-top: -10px;
}
.license-text {
max-height: 200px;
overflow-y: scroll;
white-space: pre-wrap;
}
</style>
</head>
<body>
<main class="container">
<div class="intro">
<h1>Third Party Licenses</h1>
<p>This page lists the licenses of the projects used in RustMailer.</p>
</div>
<h2>Overview of licenses:</h2>
<ul class="licenses-overview">
{{#each overview}}
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
{{/each}}
</ul>
<h2>All license text:</h2>
<ul class="licenses-list">
{{#each licenses}}
<li class="license">
<h3 id="{{id}}">{{name}}</h3>
<h4>Used by:</h4>
<ul class="license-used-by">
{{#each used_by}}
<li><a href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}} {{crate.version}}</a></li>
{{/each}}
</ul>
<pre class="license-text">{{text}}</pre>
</li>
{{/each}}
</ul>
</main>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
accepted = [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"MPL-2.0",
"ISC",
"Unicode-3.0",
"BSL-1.0",
"Unicode-DFS-2016",
"CDLA-Permissive-2.0",
"Zlib",
"Apache-2.0 WITH LLVM-exception",
"0BSD",
"BSD-2-Clause",
"NCSA",
"CC0-1.0",
"OpenSSL"
]
+2 -1
View File
@@ -15,7 +15,8 @@ WORKDIR /opt/rustmailer
# Copy compiled binary (ensure it's statically linked or compatible with bullseye)
COPY --chown=rmailer:rmailer rustmailer /opt/rustmailer/rustmailer
COPY --chown=rmailer:rmailer LICENSE /opt/rustmailer/
COPY --chown=rmailer:rmailer license.html /opt/rustmailer/
# Set proper permissions
RUN chmod +x /opt/rustmailer/rustmailer
+20585
View File
File diff suppressed because it is too large Load Diff