Skip to content

Commit

Permalink
Condense two RUN statements
Browse files Browse the repository at this point in the history
Signed-off-by: Kate Goldenring <[email protected]>
  • Loading branch information
kate-goldenring committed Nov 18, 2021
1 parent 07e0437 commit 75f8467
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
12 changes: 5 additions & 7 deletions build/containers/Dockerfile.agent
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ RUN echo "Using Rust binaries from ${CROSS_BUILD_TARGET}/${BUILD_TYPE}"
# Link the container to the Akri repository
LABEL org.opencontainers.image.source https://github.com/project-akri/akri

RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev openssl curl ca-certificates && apt-get clean

COPY ./target/${CROSS_BUILD_TARGET}/${BUILD_TYPE}/agent /agent

# Install crictl
RUN VERSION="v1.17.0" && \
# Install crictl and openssl dependencies
RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev openssl curl ca-certificates &&
VERSION="v1.17.0" && \
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz --output crictl-$VERSION-linux-amd64.tar.gz && \
tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin && \
rm -f crictl-$VERSION-linux-amd64.tar.gz && \
apt-get remove -y curl ca-certificates && apt-get clean


COPY ./target/${CROSS_BUILD_TARGET}/${BUILD_TYPE}/agent /agent
ENV RUST_LOG agent,akri_shared
CMD ["./agent"]
6 changes: 2 additions & 4 deletions build/containers/Dockerfile.agent-full
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ RUN echo "Using Rust binaries from ${CROSS_BUILD_TARGET}/${BUILD_TYPE}"
# Link the container to the Akri repository
LABEL org.opencontainers.image.source https://github.com/project-akri/akri

RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev openssl curl ca-certificates && apt-get clean

# Install crictl
RUN VERSION="v1.17.0" && \
RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev openssl curl ca-certificates &&
VERSION="v1.17.0" && \
curl -L https://github.com/kubernetes-sigs/cri-tools/releases/download/$VERSION/crictl-$VERSION-linux-amd64.tar.gz --output crictl-$VERSION-linux-amd64.tar.gz && \
tar zxvf crictl-$VERSION-linux-amd64.tar.gz -C /usr/local/bin && \
rm -f crictl-$VERSION-linux-amd64.tar.gz && \
Expand Down

0 comments on commit 75f8467

Please sign in to comment.