Skip to content

Commit

Permalink
Merge pull request #1263 from GaloisInc/T1261-T1262-docker-image-impr…
Browse files Browse the repository at this point in the history
…ovements

Give Docker images non-root users, give `crux-mir` image a C compiler (#1261, #1262)
  • Loading branch information
RyanGlScott authored Oct 16, 2024
2 parents 3e165da + 04bc614 commit eb6bd6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/Dockerfile-crux-llvm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ RUN cp -r c-src /usr/local/

RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
USER crux-llvm
ENV LD_LIBRARY_PATH=/usr/local/lib
ENV CLANG=clang-${LLVM_VER}
ENV LLVM_LINK=llvm-link-${LLVM_VER}
Expand Down
5 changes: 4 additions & 1 deletion .github/Dockerfile-crux-mir
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ FROM ubuntu:22.04
USER root
RUN apt-get update && \
apt-get install -y \
libgmp10 zlib1g libcurl4
libgmp10 zlib1g libcurl4 \
# A C toolchain (needed to build crates that require a C compiler)
clang

ARG DIR=/crux-mir
COPY --from=mir_json /usr/local/cargo /usr/local/cargo
Expand All @@ -89,6 +91,7 @@ RUN mkdir -p ${DIR}/workspace

WORKDIR ${DIR}/workspace

USER crux-mir
ENV CARGO_HOME=/usr/local/cargo \
RUSTUP_HOME=/usr/local/rustup \
CRUX_RUST_LIBRARY_PATH=/crux-mir/rlibs \
Expand Down

0 comments on commit eb6bd6f

Please sign in to comment.