chore: try /root as base dir

This commit is contained in:
Tunghsiao Liu 2021-07-06 05:17:38 -04:00
parent 5d32f913bd
commit 77bb9c27f4
No known key found for this signature in database
GPG Key ID: 1EC07B97513A7726
2 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,14 @@
FROM algolia/docsearch-scraper:latest
LABEL maintainer="t@sparanoid.com"
# Get rid of /github/home
# https://stackoverflow.com/a/63144407/412385
ENV WORKON_HOME /root
ENV PIPENV_PIPFILE /root/Pipfile
RUN pipenv install
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@ -1,8 +1,11 @@
#!/bin/sh
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions
cd /root
ls -lah
ls -lah src
# `$*` expands the `args` supplied in an `array` individually
# or splits `args` in a string separated by whitespace.
sh -c "ls -lah"
sh -c "ls -lah src"
sh -c "pipenv run python -m src.index $*"