Created
January 10, 2018 16:26
-
-
Save odykyi/9a356931f67ba4258535f14f07a2ee91 to your computer and use it in GitHub Desktop.
Dockerfile nodejs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mhart/alpine-node:8.9.4 | |
ARG GHT | |
ARG ENGINE_ID_ARG | |
ARG COMMIT_HASH_ARG | |
ARG BUILD_DATE_ARG | |
ARG ENV_TYPE | |
ENV ENV_APP_HOME=/app | |
ENV CONFIG_FILE $ENV_APP_HOME/conf/config.json | |
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib | |
ENV ENGINE_ID=$ENGINE_ID_ARG | |
ENV NODE_ENV production | |
ENV LOG_LEVEL info | |
ENV PATH=/root/.local/bin/:$PATH | |
ENV COMMIT_HASH=$COMMIT_HASH_ARG | |
ENV BUILD_DATE=$BUILD_DATE_ARG | |
#ENV REK_WORKER_AWS_ACCESS_KEY=xxx | |
#ENV REK_WORKER_AWS_SECRET_ACCESS_KEY=xxx | |
ENV GITHUB_TOKEN=xxx | |
ADD . $ENV_APP_HOME | |
ADD manifest.json /var/ | |
WORKDIR $ENV_APP_HOME/ | |
RUN mkdir -p $ENV_APP_HOME && apk update | |
RUN apk add -U git curl file | |
RUN npm install git+https://$GITHUB_TOKEN:[email protected]/USER/REPO.git | |
RUN npm install aws-sdk | |
RUN apk update && apk add py-pip && pip install --upgrade pip | |
RUN pip install awscli --upgrade --user && mkdir -p /root/.aws | |
RUN cp $ENV_APP_HOME/conf/aws_credentials /root/.aws/credentials | |
RUN cp $ENV_APP_HOME/conf/aws_config /root/.aws/config | |
RUN cd $ENV_APP_HOME && npm install | |
RUN rm /root/.netrc | |
RUN node -v | |
RUN npm -v | |
ENTRYPOINT ["/app/app.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment