feat: build docker
This commit is contained in:
24
.drone.yml
Normal file
24
.drone.yml
Normal file
@ -0,0 +1,24 @@
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: default
|
||||
metadata:
|
||||
namespace: git
|
||||
concurrency:
|
||||
limit: 1
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
steps:
|
||||
- name: build
|
||||
image: docker
|
||||
privileged: true
|
||||
environment:
|
||||
TOKEN_DOCKER:
|
||||
from_secret: docker_hub
|
||||
commands:
|
||||
- dockerd &
|
||||
- docker login -u voidic -p $TOKEN_DOCKER
|
||||
- docker buildx build --push -t voidic/tiktok-dvm:latest .
|
||||
- kill $(cat /var/run/docker.pid)
|
38
Cargo.lock
generated
38
Cargo.lock
generated
@ -1713,25 +1713,6 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rust_dvm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
"clap",
|
||||
"env_logger",
|
||||
"hex",
|
||||
"log",
|
||||
"nostr-sdk",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"sha2",
|
||||
"tokio",
|
||||
"url",
|
||||
"yt-dlp",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc-demangle"
|
||||
version = "0.1.24"
|
||||
@ -2123,6 +2104,25 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tiktok_dvm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
"clap",
|
||||
"env_logger",
|
||||
"hex",
|
||||
"log",
|
||||
"nostr-sdk",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"sha2",
|
||||
"tokio",
|
||||
"url",
|
||||
"yt-dlp",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "time"
|
||||
version = "0.3.37"
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "rust_dvm"
|
||||
name = "tiktok_dvm"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
ARG IMAGE=rust:bookworm
|
||||
ARG FEATURES
|
||||
|
||||
FROM $IMAGE AS build
|
||||
WORKDIR /app/src
|
||||
COPY src src
|
||||
COPY Cargo.lock Cargo.lock
|
||||
COPY Cargo.toml Cargo.toml
|
||||
RUN cargo install --path . --root /app/build --features "${FEATURES}"
|
||||
|
||||
FROM $IMAGE AS runner
|
||||
LABEL org.opencontainers.image.source="https://git.v0l.io/Kieran/tiktok-dvm"
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
LABEL org.opencontainers.image.authors="Kieran"
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/build .
|
||||
ENTRYPOINT ["./bin/tiktok_dvm"]
|
Reference in New Issue
Block a user