forked from commoncrawl/cc-index-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (23 loc) · 872 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.9
# Add these near the top of your Dockerfile
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ARG AWS_DEFAULT_REGION
# Set them as environment variables
ENV AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
ENV AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
ENV AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}
RUN apt-get -qq update && apt-get -qqy install awscli
# Install dependencies
COPY ./requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
# Add the cc-index-server code into the image
COPY ./ /opt/webapp/
WORKDIR /opt/webapp
RUN chmod +x ./install-collections.sh
RUN ./install-collections.sh
# Note: to avoid that collections are fetched anew on every image build,
# you may install collections locally on the host in the build directory
# and remove this command
COPY config.yaml /opt/webapp/config.yaml
CMD /usr/local/bin/wayback