Skip to content

Commit

Permalink
chore: use root user in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielc committed Feb 1, 2024
1 parent 845ff30 commit 365595e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,14 @@ FROM public.ecr.aws/r5b3e0r5/3box/rust-builder:latest as builder
RUN mkdir -p /home/builder/keramik/
WORKDIR /home/builder/keramik/

# Use the same ids as the parent docker image by default
# ARG UID=1001
# ARG GID=1001
USER root

# Copy in source code
COPY . .

# Build application using a docker cache
# To clear the cache use:
# docker builder prune --filter type=exec.cachemount
RUN --mount=type=cache,target=/home/builder/.cargo,uid=1001,gid=1001 \
--mount=type=cache,target=/home/builder/keramik/target,uid=1001,gid=1001 \
RUN --mount=type=cache,target=/home/builder/.cargo \
--mount=type=cache,target=/home/builder/keramik/target \
make build && \
cp ./target/release/keramik-runner ./target/release/keramik-operator ./

Expand Down

0 comments on commit 365595e

Please sign in to comment.