File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11/target
22site.db
33docs /
4- README.md
4+ README.md
5+ Dockerfile
6+ .dockerignore
7+ .github /
Original file line number Diff line number Diff line change 1- FROM rust:1.63-slim-buster as builder
1+ FROM rust:1.63-alpine3.16 as builder
22RUN rustup component add clippy rustfmt
3+ RUN apk add --no-cache musl-dev
34WORKDIR /usr/src/sqlpage
45RUN cargo init .
56COPY Cargo.toml Cargo.lock .
67RUN cargo build --release
78COPY . .
8- RUN cargo check --release && \
9+ RUN touch src/main.rs && \
910 cargo clippy --release && \
1011 cargo fmt --all -- --check && \
11- cargo install --path .
12+ cargo test --release && \
13+ cargo build --release
1214
13- FROM debian:buster-slim
14- RUN apt-get update && apt-get upgrade --yes && apt-get install --yes openssl
15+ FROM alpine:3.16
1516RUN rm -rf /var/lib/apt/lists/*
16- COPY --from=builder /usr/local/cargo/bin /sqlpage /usr/local/bin/sqlpage
17- RUN groupadd -r sqlpage && useradd --no-log-init -r -g sqlpage sqlpage
17+ COPY --from=builder /usr/src/sqlpage/target/release /sqlpage /usr/local/bin/sqlpage
18+ RUN addgroup -S sqlpage && adduser -S sqlpage -G sqlpage
1819WORKDIR /var/www
1920USER sqlpage
2021EXPOSE 8080
You can’t perform that action at this time.
0 commit comments