Skip to content

Instantly share code, notes, and snippets.

@medelman17
Created May 24, 2018 23:07
Show Gist options
  • Save medelman17/bd14e1da369701c95d7cbd6b8b1e9912 to your computer and use it in GitHub Desktop.
Save medelman17/bd14e1da369701c95d7cbd6b8b1e9912 to your computer and use it in GitHub Desktop.
Dockerfile For AWS Compatible GraphQL Server
FROM amazonlinux:2
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN yum update -y && yum install -y \
apt-transport-https \
build-essential \
ca-certificates \
curl \
make \
git \
libssl-dev \
wget \
tar.x86_64 \
&& yum clean all
WORKDIR /home/usr/app
ENV NVM_DIR="/home/usr/.nvm"
ENV NODE_VERSION=8.10.0
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
RUN curl -o- "https://bootstrap.pypa.io/get-pip.py" | python
RUN pip install awscli --upgrade
RUN node -e "console.log('Running Node.js ' + process.version)"
RUN npm i -g yarn
COPY package.json .
RUN yarn && yarn global add prisma graphql-cli
COPY . .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment