Archived
Use best practices for Dockerfiles (#180)
This commit is contained in:
1 parent
bcbe60a8d8
commit
5cc50eb522
7 files changed
+34
-25
No files matched your search
+10
-11
@@ -13,7 +13,7 @@ RUN apt-get update \
|
||||
curl \
|
||||
jq \
|
||||
netcat \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin
|
||||
|
||||
# Get Mattermost
|
||||
RUN mkdir -p /mattermost/data \
|
||||
@@ -22,15 +22,14 @@ RUN mkdir -p /mattermost/data \
|
||||
&& cp /mattermost/config/config.json /config.json.save \
|
||||
&& rm -rf /mattermost/config/config.json
|
||||
|
||||
# Configure entrypoint
|
||||
COPY docker-entry.sh /
|
||||
# Set permission (TODO should be removed and replace by a chmod on the file in the repository ?)
|
||||
RUN chmod +x /docker-entry.sh
|
||||
ENTRYPOINT ["/docker-entry.sh"]
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
VOLUME /mattermost/data
|
||||
|
||||
# Configure entrypoint and command
|
||||
COPY entrypoint.sh /
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
WORKDIR /mattermost/bin
|
||||
CMD ["platform"]
|
||||
|
||||
# Expose port 80 of the container
|
||||
EXPOSE 80
|
||||
|
||||
# Use a volume for the data directory
|
||||
VOLUME /mattermost/data
|
||||
Regular → Executable
File renamed without changes.
Reference in new issue
Block a user