Skip to content

Commit 24e0ce9

Browse files
committed
ref(Dockerfile): simplify chown commands
1 parent e86be45 commit 24e0ce9

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

rootfs/Dockerfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ FROM heroku/cedar:14
22

33
RUN mkdir /app
44
RUN addgroup --quiet --gid 2000 slug && \
5-
useradd slug --uid=2000 --gid=2000 --home-dir /app --no-create-home
5+
useradd slug --uid=2000 --gid=2000 --home-dir /app --no-create-home
66

77
# disable source repos (speeds up apt-get update)
88
RUN sed -i -e 's/^deb-src/#deb-src/' /etc/apt/sources.list && \
9-
apt-get update && \
10-
apt-get install -y md5deep && \
11-
apt-get clean && \
12-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc && \
13-
bash -c "mkdir -p /usr/share/man/man{1..8}"
9+
apt-get update && \
10+
apt-get install -y md5deep && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc && \
13+
bash -c "mkdir -p /usr/share/man/man{1..8}"
1414

1515
ADD . /
1616
ENV PYTHONPATH $PYTHONPATH:/usr/local/lib/python3/site-packages
1717
ADD https://storage.googleapis.com/object-storage-cli/bb8e054/objstorage-bb8e054-linux-amd64 /bin/objstorage
18-
RUN chmod +x /bin/objstorage
19-
RUN chown -R slug:slug /app
20-
RUN chown slug:slug /bin/get_object
21-
RUN chown slug:slug /bin/normalize_storage
22-
RUN chown slug:slug /bin/put_object
23-
RUN chown slug:slug /bin/objstorage
24-
RUN chown slug:slug /bin/read_procfile_keys
25-
RUN chown slug:slug /bin/restore_cache
26-
RUN chown slug:slug /bin/store_cache
18+
RUN chmod +x /bin/objstorage && \
19+
chown -R slug:slug /app && \
20+
chown slug:slug /bin/get_object \
21+
/bin/normalize_storage \
22+
/bin/put_object \
23+
/bin/objstorage \
24+
/bin/read_procfile_keys \
25+
/bin/restore_cache \
26+
/bin/store_cache
2727

2828
USER slug
2929
ENV HOME /app

0 commit comments

Comments
 (0)