ci(docker): add Dockerfile
This commit is contained in:
parent
e1fca0eb1e
commit
070953f477
8
.dockerignore
Normal file
8
.dockerignore
Normal file
@ -0,0 +1,8 @@
|
||||
target/
|
||||
.git/
|
||||
.gitignore
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
README.md
|
||||
.env
|
||||
*.md
|
||||
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
# Chef
|
||||
FROM rust:1.94 AS chef
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends musl-tools && rm -rf /var/lib/apt/lists/*
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
RUN cargo install --locked cargo-chef
|
||||
WORKDIR /app
|
||||
|
||||
COPY Cargo.toml Cargo.lock .
|
||||
RUN mkdir src && touch src/main.rs
|
||||
# Если у вас workspace или несколько крейтов, скопируйте их манифесты тоже:
|
||||
# COPY crates/*/Cargo.toml ./crates/*/
|
||||
|
||||
RUN cargo chef prepare --recipe-path /app/recipe.json
|
||||
|
||||
|
||||
# Builder
|
||||
FROM chef AS builder
|
||||
|
||||
COPY --from=chef /app/recipe.json /app/recipe.json
|
||||
RUN cargo chef cook --target x86_64-unknown-linux-musl --release --recipe-path /app/recipe.json
|
||||
|
||||
## Если есть rust-toolchain.toml
|
||||
# COPY rust-toolchain.toml rust-toolchain.toml
|
||||
# RUN cargo fetch
|
||||
|
||||
COPY . .
|
||||
RUN cargo build --target x86_64-unknown-linux-musl --release
|
||||
|
||||
|
||||
# Runtime
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/example /usr/local/bin/example
|
||||
|
||||
CMD ["/usr/local/bin/example"]
|
||||
82
index.html
82
index.html
@ -1,82 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>thek4n</title>
|
||||
<meta name="description" content="thek4n - developer">
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="top-controls">
|
||||
<div>
|
||||
|
||||
<a id="lang-en" class="active" href="https://thek4n.ru/en">English</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<h1>TheK4n</h1>
|
||||
<p><small>Developer</small></p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Projects</h1>
|
||||
|
||||
<p>
|
||||
<span><a href="https://paste.thek4n.ru">project</a></span>
|
||||
:
|
||||
<span><a href="https://gitea.thek4n.ru/thek4n/paste.thek4n.ru">thek4n/paste.thek4n.ru</a></span>
|
||||
<span><small class="muted">(copy/paste service)</small>
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>About Me</h1>
|
||||
<p>About me text</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>GPG</h2>
|
||||
|
||||
<p>
|
||||
<span>Available at</span>
|
||||
<a href="/gpgkey.txt" target="_blank" rel="noopener noreferrer" >thek4n.ru/gpgkey.txt</a>
|
||||
</p>
|
||||
|
||||
<details class="gpg-details">
|
||||
<summary>
|
||||
::marker
|
||||
<span class="summary-row">
|
||||
Show key
|
||||
<a id="copy-gpg" class="copy-link" href="#" onclick="copyGPGKey()">Copy</a>
|
||||
</span>
|
||||
key....
|
||||
</summary>
|
||||
</details>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Contacts</h2>
|
||||
|
||||
<p>
|
||||
<span>Telegram</span>
|
||||
:
|
||||
<span><a href="https://t.me/thek4n">@thek4n</a></span>
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<p>© 2026 Vladislav Kan <thek4n@yandex.ru></p>
|
||||
</footer>
|
||||
</main>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user