Skip to content
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

Merged
merged 7 commits into from May 1, 2019

Conversation

@turt2live
Copy link
Member

turt2live commented Apr 10, 2019

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:

  • Reduce build context size for dirty environments (developers)
  • Support using custom SDKs - this is to support us having a :develop or similar image if we want it
  • Use yarn now that we've switched to it
  • Misc improvements (layer reduction, docs, etc)
@turt2live turt2live requested a review from vector-im/riot-web Apr 10, 2019
@jryans jryans self-requested a review Apr 11, 2019
Copy link
Member

jryans left a comment

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

This comment has been minimized.

Copy link
@jryans

jryans Apr 11, 2019

Member

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

This comment has been minimized.

Copy link
@jryans

jryans Apr 11, 2019

Member

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. 😅

This comment has been minimized.

Copy link
@turt2live

turt2live Apr 11, 2019

Author Member

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

@turt2live

This comment has been minimized.

Copy link
Member Author

turt2live commented Apr 11, 2019

How would publishing to Docker Hub work? Will we add that to our release steps for official releases, or...?

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

This comment has been minimized.

Copy link
@SISheogorath

SISheogorath Apr 13, 2019

It makes no sense to convert it during the docker build. This should be done before adding it to the repository.

This comment has been minimized.

Copy link
@turt2live

turt2live Apr 13, 2019

Author Member

It is committed with the right line endings, but Windows tends to not care once it is on disk.

This comment has been minimized.

Copy link
@SISheogorath

SISheogorath Apr 13, 2019

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

This comment has been minimized.

Copy link
@turt2live

turt2live Apr 13, 2019

Author Member

I've tried everything in the book, trust me.

@turt2live turt2live added the blocked label Apr 15, 2019
@turt2live turt2live self-assigned this Apr 15, 2019
@turt2live

This comment has been minimized.

Copy link
Member Author

turt2live commented May 1, 2019

Merging in hopes that it triggers a build

@turt2live turt2live merged commit 9957149 into develop May 1, 2019
4 checks passed
4 checks passed
buildkite/riot-web Build #141 passed (2 minutes, 45 seconds)
Details
buildkite/riot-web/eslint-lint Passed (1 minute, 10 seconds)
Details
buildkite/riot-web/karma-tests Passed (2 minutes, 40 seconds)
Details
buildkite/riot-web/pipeline Passed (4 seconds)
Details
@turt2live turt2live deleted the travis/dockerfile-continued branch May 1, 2019
@turt2live turt2live restored the travis/dockerfile-continued branch May 3, 2019
@turt2live turt2live referenced this pull request May 3, 2019
@turt2live turt2live deleted the travis/dockerfile-continued branch May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.