-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (20 loc) · 742 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (20 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM rust:slim AS source
WORKDIR /ipsort
COPY . /ipsort
RUN cargo vendor --locked
FROM source AS build
RUN cargo build --frozen --release --verbose
FROM build AS test
RUN cargo test
FROM debian:stable-slim
LABEL org.opencontainers.image.title=ipsort
LABEL org.opencontainers.image.version=v1.3.0
LABEL org.opencontainers.image.description="versitile ip address sorting tool"
LABEL org.opencontainers.image.url=https://github.com/mfinelli/ipsort
LABEL org.opencontainers.image.source=https://github.com/mfinelli/ipsort
LABEL org.opencontainers.image.licenses=GPL-3.0-or-later
RUN useradd -r -U -m ipsort
COPY --from=source /ipsort /usr/src/ipsort
COPY --from=build /ipsort/target/release/ipsort /usr/bin/ipsort
USER ipsort
CMD ["ipsort"]