Skip to content

Commit

Permalink
docker: fix jq/python/pip installs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 12, 2023
1 parent 7b79bbb commit b456a65
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions packaging/rtx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
FROM rust as builder
LABEL maintainer="jdx"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

WORKDIR /usr/src/rtx
COPY . /usr/src/rtx/
RUN cargo build --release

FROM rust as runtime

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV RTX_DATA_DIR="/rtx"
ENV RTX_CONFIG_DIR="/rtx"
ENV RTX_CACHE_DIR="/rtx/cache"
ENV PATH="/rtx/shims:$PATH"
WORKDIR /usr/src/rtx

COPY . /usr/src/rtx/
COPY --from=builder /usr/src/rtx/target/release/rtx /usr/local/bin/rtx

RUN cargo build --release \
&& ln -s /usr/bin/{python3,python} \
&& python -V \
&& apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y \
jq \
&& rm -rf /var/lib/apt/lists/* && apt-get clean

FROM rust as runtime

COPY --from=builder /usr/src/rtx/target/release/rtx /usr/local/bin/rtx
python3-pip \
&& rm -rf /var/lib/apt/lists/* && apt-get clean \
&& ln -s ./python3 /usr/bin/python \
&& rtx -v

WORKDIR /rtx
ENTRYPOINT ["rtx"]
Expand Down

0 comments on commit b456a65

Please sign in to comment.