-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (43 loc) · 1.52 KB
/
Dockerfile
File metadata and controls
48 lines (43 loc) · 1.52 KB
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
FROM heroku/heroku:20-build
ENV DEBIAN_FRONTEND noninteractive
RUN mkdir /app
RUN addgroup --quiet --gid 2000 slug && \
useradd slug --uid=2000 --gid=2000 --home-dir /app --no-create-home
# disable source repos (speeds up apt-get update)
RUN sed -i -e 's/^deb-src/#deb-src/' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y md5deep && \
# cleanup
apt-get autoremove -y && \
apt-get clean -y && \
# package up license files if any by appending to existing tar
rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
bash -c "mkdir -p /usr/share/man/man{1..8}"
ADD . /
ENV PYTHONPATH $PYTHONPATH:/usr/local/lib/python3/site-packages
ADD https://storage.googleapis.com/hephy-obj-storage-cli/bb8e054/objstorage /usr/bin/objstorage
RUN chmod +x /usr/bin/objstorage && \
chown -R slug:slug /app && \
chown slug:slug /usr/bin/get_object \
/usr/bin/normalize_storage \
/usr/bin/put_object \
/usr/bin/objstorage \
/usr/bin/read_procfile_keys \
/usr/bin/restore_cache \
/usr/bin/store_cache
USER slug
ENV HOME /app
RUN /builder/install-buildpacks
ENTRYPOINT ["/builder/build.sh"]