generated from DistributedScience/Distributed-Something
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
64 lines (49 loc) · 1.24 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# - [ BROAD'16 ] -
#
# A docker instance for accessing AWS resources
# This wraps your docker registry
#
FROM ubuntu:18.04
# Install S3FS
USER root
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install \
automake \
autotools-dev \
g++ \
git \
libcurl4-gnutls-dev \
libfuse-dev \
libssl-dev \
libxml2-dev \
make pkg-config \
sysstat \
curl
WORKDIR /usr/local/src
RUN git clone https://github.com/s3fs-fuse/s3fs-fuse.git
WORKDIR /usr/local/src/s3fs-fuse
RUN ./autogen.sh
RUN ./configure
RUN make
RUN make install
# Install Python - not needed if you've already got it in your container
# If you have a non-3.8 version, you will need to change python3.8 calls where specified
RUN apt install -y python3.8-dev python3.8-distutils python3-pip
# Install AWS CLI
RUN python3.8 -m pip install awscli
# Install boto3
RUN python3.8 -m pip install boto3
# Install watchtower for logging
RUN python3.8 -m pip install watchtower
# SETUP NEW ENTRYPOINT
RUN mkdir -p /home/ubuntu/
WORKDIR /home/ubuntu
COPY generic-worker.py .
COPY instance-monitor.py .
COPY run-worker.sh .
RUN chmod 755 run-worker.sh
WORKDIR /home/ubuntu
ENTRYPOINT ["./run-worker.sh"]
CMD [""]