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 git #45

Open
OmgImAlexis opened this issue Nov 30, 2017 · 4 comments
Open

Add git #45

OmgImAlexis opened this issue Nov 30, 2017 · 4 comments

Comments

@OmgImAlexis
Copy link

It'd be nice if the containers had git support added so packages can be installed from git addresses.

Ref: npm/npm#17985

@simonepri
Copy link

simonepri commented Dec 30, 2017

Hello @OmgImAlexis, thank you for opening the issue!

I think it's a pretty reasonable request.

We just need to add something like this:
RUN apk update && apk upgrade && apk add --no-cache git

@Unitech I think it can be useful for who has packages that are not available on npm (like private packages).
I'm only concerned about the size increase of the image.

@Unitech
Copy link
Member

Unitech commented Jan 3, 2018

that looks good to me! definitely agree on that!

@Maxosys
Copy link

Maxosys commented Feb 6, 2018

Thanks it works

RUN npm install --no-cache git

@daithi-coombes
Copy link

Generally there is a that needs git, or at least g++, make etc. I've added suggestions from nodejs/docker-node#282 (comment) to my Dockerfile:

Note: this greatly increases build time, so maybe blocker for the auto-builds. So maybe solution is to put it in documentation for if needed cases? (documentation link: https://pm2.io/doc/en/runtime/integration/docker/#using-pm2-with-docker)

FROM keymetrics/pm2:latest-alpine

# Bundle APP files
COPY app src/
COPY app/package.json .
COPY ecosystem.config.js .

# stick with parent version of alpine, don't update/upgrade
RUN apk --no-cache --virtual build-dependencies add \
    python \
    make \
    g++ \
    git

# Install app dependencies
ENV NPM_CONFIG_LOGLEVEL warn
RUN npm install --production \
    && apk del build-dependencies

# Expose the listening port of your app
EXPOSE 3004

# Show current folder structure in logs
RUN ls -al -R

CMD [ "pm2-runtime", "start", "ecosystem.config.js" ]

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

5 participants