update: repo & deps
This commit is contained in:
parent
7f8b19353a
commit
90856717e4
4 changed files with 164 additions and 631 deletions
41
Dockerfile
Normal file
41
Dockerfile
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
FROM rustlang/rust:nightly-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt update && apt install -y \
|
||||
musl-tools \
|
||||
musl-dev \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
curl \
|
||||
pkg-config \
|
||||
ca-certificates \
|
||||
protobuf-compiler
|
||||
|
||||
# Copy dependency files first for better caching
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY ./src ./src
|
||||
COPY build.rs ./
|
||||
COPY tbm-proto ./tbm-proto
|
||||
|
||||
# Download config
|
||||
RUN curl -X GET https://pakin-inspiron-15-3530.tail110d9.ts.net/pakin/tbm-git-repo-service/releases/download/config/.tbcfg -o .tbcfg
|
||||
|
||||
# Build the application
|
||||
RUN cargo build --release
|
||||
|
||||
# Builder
|
||||
FROM gcr.io/distroless/cc
|
||||
|
||||
# Copy the binary
|
||||
COPY --from=builder /app/target/release/tbm-git-repo-service /
|
||||
COPY --from=builder /app/.tbcfg /
|
||||
|
||||
# Create data directory
|
||||
|
||||
EXPOSE 36583
|
||||
|
||||
# Environment defaults
|
||||
|
||||
CMD ["./tbm-git-repo-service"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue