Switch from python to rust
This commit is contained in:
33
Dockerfile
33
Dockerfile
@ -1,12 +1,27 @@
|
||||
FROM python:3.10-slim-bullseye
|
||||
FROM docker.io/rust:1.65.0-slim-bullseye as builder
|
||||
|
||||
RUN apt-get update -yq && \
|
||||
apt-get install -y --no-install-recommends glusterfs-client
|
||||
apt install -y --no-install-recommends \
|
||||
build-essential \
|
||||
libssl-dev \
|
||||
pkg-config \
|
||||
protobuf-compiler \
|
||||
libprotobuf-dev
|
||||
|
||||
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM docker.io/debian:bullseye-slim
|
||||
|
||||
RUN apt-get update -yq && \
|
||||
apt-get install -y --no-install-recommends glusterfs-client htop
|
||||
|
||||
COPY --from=builder /src/target/release/gluster-dir-csi /usr/local/bin/gluster-dir-csi
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/gluster-dir-csi"]
|
||||
|
||||
|
||||
|
||||
COPY requirements.txt /
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install -r /requirements.txt
|
||||
RUN pip3 install -r /requirements.txt
|
||||
COPY *.py /
|
||||
RUN mkdir /csi
|
||||
CMD python3 -u /main.py
|
||||
|
Reference in New Issue
Block a user