File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -96,12 +96,14 @@ RUN chmod +x /usr/bin/entrypoint.sh
96
96
COPY bin/docker/build-meteor.sh /usr/bin/build-meteor.sh
97
97
RUN chmod +x /usr/bin/build-meteor.sh
98
98
99
+ COPY bin/docker/cleanup.sh /usr/bin/cleanup.sh
100
+ RUN chmod +x /usr/bin/cleanup.sh
101
+
99
102
# Make sure we have a directory for the application
100
103
RUN mkdir -p /var/www
101
104
RUN chown -R www-data:www-data /var/www
102
105
103
106
# add app to /usr/src
104
- VOLUME ["/usr/src/meteor" ]
105
107
VOLUME ["/data/db" ]
106
108
COPY . /usr/src/meteor
107
109
WORKDIR /usr/src/meteor/
@@ -116,6 +118,11 @@ WORKDIR /usr/src/meteor/
116
118
#
117
119
RUN bash /usr/bin/build-meteor.sh
118
120
121
+ # cleanup
122
+ RUN apt-get autoremove -y
123
+ RUN npm cache clear
124
+ RUN bash /usr/bin/cleanup.sh
125
+
119
126
# switch to production meteor bundle
120
127
WORKDIR /var/www/bundle
121
128
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # Clean out docs
6
+ rm -rf /usr/share/doc /usr/share/doc-base /usr/share/man /usr/share/locale /usr/share/zoneinfo
7
+
8
+ # Clean out package management dirs
9
+ rm -rf /var/lib/cache /var/lib/log
10
+
11
+ # Clean out /tmp
12
+ rm -rf /tmp/*
13
+
14
+ # Clean out Meteor and app src files
15
+ rm -rf ~ /.meteor /usr/src/meteor
16
+ rm /usr/local/bin/meteor
You can’t perform that action at this time.
0 commit comments