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

[Suggestion] Official docker image on docker hub #8

Open
shahabganji opened this issue Jun 22, 2019 · 5 comments
Open

[Suggestion] Official docker image on docker hub #8

shahabganji opened this issue Jun 22, 2019 · 5 comments

Comments

@shahabganji
Copy link

I think it would be beneficial for the whole community to have an official Aurelia docker image in which some services like aurelia-cli are installed by default.

This will help them to be able to have multiple images with different CLI version, side by side, and it could help them to facilitate the CI/CD pipeline by focusing on their application's requirements for dockerization rather than thinking of which aurelia-cli or compatible versions of its dependencies to be installed.

A simple suggested docker image could be built using the following:

FROM node:12
ENV NODE_ENV development

RUN npm install -g yarn
RUN npm install -g webpack
RUN npm install -g aurelia-cli@1.0.1

WORKDIR /app

EXPOSE 8080

CMD [ "bash" ]

Then we could have different versions, with different configurations pre-installed so that developers are able to test their application with those configurations.

/cc @EisenbergEffect

@fkleuver
Copy link
Member

I'm down with this idea. We can use the same image for our own CI/CD.

The one we are currently using for vCurrent CI/CD can be found here

FROM circleci/node:8.11.3-browsers

RUN sudo chown -R circleci /usr/local

RUN npm i -g npm istanbul http-server codecov protractor gulp jspm && \
    webdriver-manager update

RUN sudo apt-get update && \
    sudo apt-get install -y wget

RUN wget -O ~/ChromeSetup.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" && \
    sudo dpkg -i ~/ChromeSetup.deb; sudo apt-get -fy install && \
    rm ~/ChromeSetup.deb

Of what would you like to have different versions installed, though? The cli?

How about different versions of node, webpack and whatnot? I'm a bit worried about a potential explosion of combinations of versions here. We do need a solid, justified decision on this that makes an acceptable trade-off between flexibility and maintainability.

@shahabganji
Copy link
Author

shahabganji commented Jun 24, 2019

Please correct me if I am wrong 🙏

How about different versions of node, webpack, and whatnot? I'm a bit worried about a potential explosion of combinations of versions here.

I couldn't agree more with what you are worried about, and think there is a misunderstanding of my statement. I did not mean to have a docker file per webpack versions or any other dependencies.

We can use the same image for our own CI/CD.

Exactly, what I meant is to have a docker image in which we have what you just have here + Aurelia-CLI, no more no less.

The only thing by my suggestion is that we could have a docker image with different tags, based on the version of aurelia-cli, for instance, aurelia/cli:1.0.1 and if later we deliver a newer version of the CLI then aurelia/cli:2.0.0. And instead of putting that docker file/image in a repository where everyone should make a copy/paste, we just deliver it on docker hub for better accessibility. (Everybody who even wants to start with docker knows to check docker hub first for an image, rather than a repository in GitHub)

I think this brings better support for dockerizing aurelia apps and does not bring that much of maintainability.

@fkleuver
Copy link
Member

Alright, understood. What do you think about this existing docker image that we already have for CircleCI? We could add aurelia-cli to that, do some automated tagging magic to get a version per aurelia-cli version and we would essentially be done, right?

@shahabganji
Copy link
Author

Yes, It looks to be fine, just need the aurelia-cli and tagging; however,
may I have some time to use it with different approaches and configurations that are existed in the cli?
And as far as my knowledge allows me I'll try to come up with a PR if required.

@fkleuver
Copy link
Member

Absolutely! So for any viewers: we just discussed this on discord and it turns out there's a little bit more to it (mostly from an automation point of view). We agreed that @shahabganji will open a PR and take things from there.
I'm very excited about this and am looking forward to working together on this one as well: aurelia/cli#1127
Let's make a beautiful docker integration story :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants