-
Notifications
You must be signed in to change notification settings - Fork 575
Conversation
app/Dockerfile
Outdated
@@ -1,4 +1,4 @@ | |||
FROM ubuntu:16.04 | |||
FROM alpine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to stick on a specific Alpine version. Let's go for alpine:3.6
, which seems to be the latest.
app/Dockerfile
Outdated
|
||
RUN apk add --no-cache \ | ||
netcat-openbsd \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some maniac style comment here : can you order package list by alphabetical order and use the same indent please ? :)
app/Dockerfile
Outdated
@@ -25,6 +30,7 @@ RUN mkdir -p /mattermost/data \ | |||
|
|||
# Configure entrypoint and command | |||
COPY entrypoint.sh / | |||
RUN chmod +x /entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless entry in my opinion. We just need to set the correct permission for the file on the repository, there is no need to do it on Dockerfile I guess.
app/entrypoint.sh
Outdated
@@ -78,4 +78,4 @@ if [ "$1" = 'platform' ]; then | |||
echo "Starting platform" | |||
fi | |||
|
|||
exec "$@" | |||
exec "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep newline at the end of the file :)
I really really want to use Alpine for Mattermost Docker image, but this is an important thing and we cannot decided alone. @jasonblais I would appreciate your opinion on this. If there is also some developers at Mattermost with an experience on Alpine, I'll like to hear from them too :) |
@pichouk all fix |
Great, good job 👍 Thanks ! |
Tests failed but it seems that's because you change |
app/Dockerfile
Outdated
@@ -29,6 +29,7 @@ RUN mkdir -p /mattermost/data \ | |||
|
|||
# Configure entrypoint and command | |||
COPY entrypoint.sh / | |||
RUN chmod 750 /entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I think we should not use this instruction on the Dockerfile. I explained myself badly I guess.
Just chmod +x entrypoint.sh
inside your Git repository and commit this change :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
app/Dockerfile
Outdated
@@ -25,6 +29,7 @@ RUN mkdir -p /mattermost/data \ | |||
|
|||
# Configure entrypoint and command | |||
COPY entrypoint.sh / | |||
RUN chmod +x entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Should remove this line, run chmod 755 entrypoint.sh
inside your repository and commit the change :)
app/Dockerfile
Outdated
@@ -25,6 +29,7 @@ RUN mkdir -p /mattermost/data \ | |||
|
|||
# Configure entrypoint and command | |||
COPY entrypoint.sh / | |||
RUN chmod 755 entrypoint.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not what we should do. Access mode should be directly on the repository, not an extra-step inside the Dockerfile.
Just remove this line, apply this command on your repository chmod 755 entrypoint.sh
, commit and push changes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not understand what to do, remove chmod 755 entrypoint.sh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes remove this line. But it will then only work if correct mode is apply on entrypoint.sh
file of the repository.
It worked like that before, but it seems you changed it in your PR. When I check at your changes I see this :
It means that you change mode for the entrypoint.sh
file from 755
to 644
. You just have to run the command chmod 755 entrypoint.sh
inside your shell and push changes to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good 👍
TODO/reminder before merge:
|
Just test it on my personal server. Seems to work :) I'll wait for @xcompass review and the Mattermost doc update. Then it is ok to merge for me. |
LGTM, I'll wait for @xcompass review and if this is ok, we will merge :) |
@pichouk Before we merge the Alpine changes, there was a proposal for one of the Mattermost members do a quick sanity test as well. We have a ticket for it here https://mattermost.atlassian.net/browse/PLT-8291 |
@jasonblais Good idea ! :) |
app/Dockerfile
Outdated
libffi-dev \ | ||
linux-headers \ | ||
netcat-openbsd \ | ||
&& rm -rf /var/cache/apk/* \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --no-cache
flag shouldn't leave anything behind here, so I'm pretty sure this line is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccbrown is this?
rm -rf / var / cache / apk / * \
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm suggesting removing that line:
RUN apk add --no-cache \
bash \
ca-certificates \
curl \
jq \
libc6-compat \
libffi-dev \
linux-headers \
netcat-openbsd \
&& rm -rf /tmp/*
As of Alpine Linux 3.3 there exists a new --no-cache option for apk. This avoids the need to use --update and remove /var/cache/apk/* when done installing packages.
– https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md#disabling-cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
app/Dockerfile
Outdated
|
||
RUN apk add --no-cache \ | ||
bash \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use /bin/sh
for the app/entrypoint.sh
script then there is no need to install bash
package I guess.
LGTM now.
Thanks :) |
Please also add |
@pichouk done |
Good. I'll wait for the Mattermost staff to test and validate this change. Also, I'll squash all commits to get a clean git history :) |
I squash the commits and test the image. Looks good to me :) |
I think @coreyhulen will be testing it soon :) Huge thanks @pichouk and everyone else involved here! |
Looks good, I've been testing it for a bit. I want to test for a little longer, but we should be gtg by tomorrow. Unrelated to this PR, but looks like I hit the issue described at docker/for-mac#2396 since we map |
Thanks to @andruwa13 who did the job :) @coreyhulen It seems that there is a workaround by using an environment variable ( |
Everything looks great, I just deployed it to my production server and everything is fine. Let's merge 🎉 😄 |
This reverts commit efec608.
This reverts commit efec608.
No description provided.