-
Notifications
You must be signed in to change notification settings - Fork 0
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
Finetune the Dockerfile for Stepup builds #4
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
FROM php:7.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would php-cli be enough? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Giving that a shot, It should be.. |
||
|
||
ARG NPM_UID=1000 | ||
ARG NPM_GID=1000 | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
|
@@ -17,22 +14,22 @@ RUN apt-get update && apt-get install -y \ | |
&& docker-php-ext-enable apc --ini-name 20-docker-php-ext-apc.ini | ||
|
||
ENV NVM_DIR /usr/local/nvm | ||
ENV NODE_VERSION 10 | ||
ENV NODE_VERSION 14 | ||
|
||
# Install nvm with node and npm | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alltough this syntax works, it's more common to put |
||
&& source $NVM_DIR/nvm.sh \ | ||
RUN mkdir $NVM_DIR \ | ||
&& curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.0/install.sh | bash \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there no more generic way than a hardcoded version to download? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will look if they provide a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sadly there is no possibility to do this at this point. |
||
&& . $NVM_DIR/nvm.sh \ | ||
&& nvm install $NODE_VERSION \ | ||
&& nvm alias default $NODE_VERSION \ | ||
&& nvm use default | ||
&& nvm use default \ | ||
&& export INSTALLED_NODE_VERSION=$(nvm version) \ | ||
# Yarn | ||
&& npm install --global yarn | ||
|
||
# Composer | ||
# Composer | ||
COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer | ||
|
||
# Fix npm | ||
RUN mkdir /.npm && chown -R "${NPM_UID}:${NPM_GID}" "/.npm" | ||
RUN mkdir /.config && chown -R "${NPM_UID}:${NPM_GID}" "/.config" | ||
|
||
# Cleanup | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
|
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.
Would this be usable for EB as well? Makes maybe sense to have only one container for all build purposes
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 guess this should work with EB just fine. Certainly opportune to test 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.
One container to rule them all!