dockerfile
704 Bytes
FROM ubuntu:18.04
RUN apt-get update
ENV NODE_VERSION=14.15.0
RUN apt install -y curl
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN npm install -g yarn
RUN apt-get install -y git
RUN mkdir /app
RUN git clone http://khuhub.khu.ac.kr/2021-1-capstone-design2/2015104215 /app
RUN cd /app/project;yarn install
RUN cd /app/project;yarn build:api
EXPOSE 5000
WORKDIR /app/project
CMD [ "yarn", "start:api" ]