Created
April 9, 2020 19:50
-
-
Save berlinbrown/77729ef6fb37ec6ecfe25b0fa9aea0b9 to your computer and use it in GitHub Desktop.
Dockerfile Configuration Amazonlinux works with DB2 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
# Build stage - 4.9.2020 | |
FROM amazonlinux:2.0.20200304.0 as build-stage | |
WORKDIR /app | |
COPY app/ ./ | |
COPY .npmrc ./ | |
# From IBM documentation: | |
RUN yum install -y add make gcc gcc-c++ | |
RUN yum install -y kernel-devel | |
RUN yum install -y openssl-devel bzip2-devel | |
RUN yum install -y python2 | |
RUN yum install -y wget | |
RUN yum install -y curl | |
RUN curl --silent --location https://rpm.nodesource.com/setup_10.x | bash - | |
RUN yum install -y nodejs | |
#RUN npm install bcrypt | |
#RUN npm install --unsafe-perm ibm_db | |
RUN npm install --unsafe-perm && npm run build | |
#---------------------------- | |
# Production stage | |
#---------------------------- | |
FROM amazonlinux:2.0.20200304.0 as production-stage | |
#RUN useradd -ms /bin/bash node | |
#USER node | |
WORKDIR /app | |
#COPY --from=build-stage --chown=node:node /app . | |
COPY --from=build-stage /app . | |
COPY docker-entrypoint.sh /usr/local/bin/ | |
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | |
# From IBM documentation: | |
RUN yum install -y openssl-devel bzip2-devel | |
RUN yum install -y python2 | |
RUN yum install -y wget | |
RUN yum install -y curl | |
RUN yum install -y pam.x86_64 | |
RUN yum install -y pam-devel.x86_64 | |
RUN curl --silent --location https://rpm.nodesource.com/setup_10.x | bash - | |
RUN yum install -y nodejs | |
#USER node | |
ENTRYPOINT ["docker-entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment