mirror of
https://github.com/signcl/docsearch-scraper-action.git
synced 2024-11-10 09:39:12 +08:00
feat: separate base image to make github action faster
This commit is contained in:
parent
7bc83e6f4c
commit
5770064c68
@ -1,14 +1,7 @@
|
|||||||
FROM algolia/docsearch-scraper:latest
|
FROM openbayes/docsearch-scraper-action-base
|
||||||
|
|
||||||
LABEL maintainer="t@sparanoid.com"
|
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
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
10
Dockerfile.base
Normal file
10
Dockerfile.base
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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
|
22
Makefile
Normal file
22
Makefile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
all: build
|
||||||
|
|
||||||
|
build-base:
|
||||||
|
docker build -f Dockerfile.base -t openbayes/docsearch-scraper-action-base:latest .
|
||||||
|
|
||||||
|
build:
|
||||||
|
docker build -t openbayes/docsearch-scraper-action:latest .
|
||||||
|
|
||||||
|
run:
|
||||||
|
docker run --rm -it --name docsearch-scraper-action openbayes/docsearch-scraper-action:latest
|
||||||
|
|
||||||
|
push-base:
|
||||||
|
docker push openbayes/docsearch-scraper-action-base:latest
|
||||||
|
|
||||||
|
push:
|
||||||
|
docker push openbayes/docsearch-scraper-action:latest
|
||||||
|
|
||||||
|
stop:
|
||||||
|
docker rm -f docsearch-scraper-action
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker rmi openbayes/docsearch-scraper-action:latest
|
Loading…
Reference in New Issue
Block a user