forked from bolcom/unFTP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalpine-istio-debug.Dockerfile.template
More file actions
26 lines (22 loc) · 1 KB
/
alpine-istio-debug.Dockerfile.template
File metadata and controls
26 lines (22 loc) · 1 KB
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
26
FROM rust:%%RUST_VERSION%%-slim AS builder
WORKDIR /usr/src/unftp
COPY . .
RUN apt-get update && apt-get install -y \
musl-dev \
musl-tools
RUN rustup target add x86_64-unknown-linux-musl
ENV RUSTFLAGS="-C target-feature=+crt-static"
RUN BUILD_VERSION="%%BUILD_VERSION%%" cargo build --no-default-features --features docker --target=x86_64-unknown-linux-musl
FROM alpine:3.17
# for devel only
RUN apk add --repository http://dl-cdn.alpinelinux.org/alpine/v3.17/main fuse lftp curl
RUN apk add --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing curlftpfs
# we could also RUN 'apk add ca-certificates', but we prefer to be consistent with the -minimal image
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=redboxoss/scuttle:latest /scuttle /bin/scuttle
# no security measures, run as root
USER root
RUN mkdir /unftp
COPY --from=builder /usr/src/unftp/target/x86_64-unknown-linux-musl/debug/unftp /unftp
WORKDIR /unftp
CMD ["scuttle", "/unftp/unftp", "-vv"]