Skip to content

Commit

Permalink
Merge pull request #6 from appvia/install-order
Browse files Browse the repository at this point in the history
Fix ordering
  • Loading branch information
KashifSaadat authored Apr 22, 2022
2 parents c2c9592 + 086173e commit b411cea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@ RUN apk add -U --no-cache \
RUN apk add --no-cache \
gcc libc-dev libffi-dev

# Install checkov and update PATH
COPY requirements.txt ./
RUN pip install -r requirements.txt

# Create a non-root user and set file permissions
RUN addgroup -S app \
&& adduser -S -g app -u 1000 app \
&& chown -R app:app $HOME \
&& echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.bashrc
&& chown -R app:app $HOME

# Run as the non-root user
USER 1000

# Install checkov and update PATH
COPY requirements.txt ./
RUN pip install -r requirements.txt

# Copy entrypoint
COPY entrypoint.sh /usr/local/bin/entrypoint.sh

Expand Down
3 changes: 0 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env bash
set -e

# Ensure PATH is up to date
source ~/.bashrc

RUN_CHECKOV_POLICIES=${RUN_CHECKOV_POLICIES:-false}
RUN_KYVERNO_POLICIES=${RUN_KYVERNO_POLICIES:-false}
POLICY_REPO_DIR="${POLICY_REPO_DIR:-/tmp/policy}"
Expand Down

0 comments on commit b411cea

Please sign in to comment.