build related
This commit is contained in:
parent
5c06377ccf
commit
827dff9611
@ -1 +1,5 @@
|
||||
testenv
|
||||
/testenv/
|
||||
build/*
|
||||
dist/*
|
||||
*.egg-info/*
|
||||
__pycache__
|
||||
|
12
Dockerfile
12
Dockerfile
@ -1,14 +1,18 @@
|
||||
FROM ubuntu:focal
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y python3-pip
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD requirements.txt /tmp/requirements.txt
|
||||
|
||||
RUN pip3 install -r /tmp/requirements.txt
|
||||
|
||||
ADD scrape.py /usr/local/bin/scrape.py
|
||||
ADD . /tmp/code/
|
||||
|
||||
RUN chmod +x /usr/local/bin/scrape.py
|
||||
RUN cd /tmp/code && \
|
||||
python3 setup.py install
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/scrape.py"]
|
||||
USER nobody
|
||||
|
||||
ENTRYPOINT ["osrsscrape"]
|
||||
|
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
DOCKERIMAGE := dockermirror:5000/dpedu/rsscrape
|
||||
DOCKEROPTS :=
|
||||
BINARY := dist/osrsscrape-0.0.0-py3-none-any.whl
|
||||
|
||||
.PHONY: $(BINARY)
|
||||
$(BINARY):
|
||||
python3 setup.py bdist_wheel
|
||||
|
||||
.PHONY: image
|
||||
image:
|
||||
docker build -t $(DOCKERIMAGE) $(DOCKEROPTS) .
|
||||
|
||||
.PHONY: push
|
||||
push: image
|
||||
docker push $(DOCKERIMAGE)
|
||||
|
||||
.PHONY: testenv
|
||||
testenv:
|
||||
virtualenv -p python3 testenv
|
||||
testenv/bin/pip3 install -r requirements.txt
|
Loading…
Reference in New Issue
Block a user