-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile (part 2) #9426
Add Dockerfile (part 2) #9426
Conversation
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.
Thanks, this looks reasonable to me overall! 😁
How would publishing to Docker Hub work? Will we add that to our release steps for official releases, or...?
|
||
To build the image yourself: | ||
```bash | ||
git clone https://github.com/vector-im/riot-web.git riot-web |
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 checkout directory will default to riot-web
, so the last argument here isn't needed.
The Docker image can be used to serve riot-web as a web server. The easiest way to use | ||
it is to use the prebuilt image: | ||
```bash | ||
docker run -p 80:80 vectorim/riot-web |
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.
Is vectorim
an existing account on Docker Hub already? It seems like matrixdotorg
does exist, but vectorim
does not... I agree it likely makes sense for Riot to be in a separate vectorim
-like account, but we should create it first before publishing these docs if it hasn't been done yet. (Also, would newvector
or something be better...?)
It's also quite possible vectorim
already does exist and I just don't understand Docker Hub at all. 😅
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 the best at including relevant details and omitted the plan here, sorry. The plan is to nag people internally for opinions first and then merge this
It'll magically work, once I set it up. Docker hub does builds for us (although they are painfully slow) and can be matched to branches and such. At worst we'll have to make sure that the riot-web push is the last one of the 3 repos or it'll end up building the wrong version. |
WORKDIR /src | ||
|
||
COPY . /src | ||
RUN dos2unix /src/scripts/docker-link-repos.sh && sh /src/scripts/docker-link-repos.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.
It makes no sense to convert it during the docker build. This should be done before adding it to the repository.
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.
It is committed with the right line endings, but Windows tends to not care once it is on disk.
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.
In this case it's not Windows but git on Windows that has automatic line conversion enabled. This should be fixable by telling git to not modify them:
# .gitattributes
*.sh text eol=lf
For details see: https://git-scm.com/docs/gitattributes
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've tried everything in the book, trust me.
Merging in hopes that it triggers a build |
Continuation of #7771
Fixes #315
I've opened a new PR for this instead of committing directly to the author's original branch because their branch is named "develop" and I don't want to accidentally break anything.
Changes from the original concept:
:develop
or similar image if we want ityarn
now that we've switched to it