completion
This commit is contained in:
29
ioneapps-maagapp-ee31119a522d/docker/local.Dockerfile
Normal file
29
ioneapps-maagapp-ee31119a522d/docker/local.Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
# BASE DOCKER IMAGE DOCKERFILE:
|
||||
ARG ECR_URL="059081848155.dkr.ecr.ap-northeast-1.amazonaws.com"
|
||||
ARG NODE_VERSION="8.11.4"
|
||||
ARG IMAGE="$ECR_URL/node-alpine:$NODE_VERSION"
|
||||
|
||||
FROM "$IMAGE" as intermediate
|
||||
# add credentials on build
|
||||
ARG SSH_PRIVATE_KEY
|
||||
RUN mkdir -p $HOME_DIR/.ssh
|
||||
RUN echo "${SSH_PRIVATE_KEY}" > $HOME_DIR/.ssh/id_rsa
|
||||
RUN chown -R $CONTAINER_USER:$CONTAINER_USER $HOME_DIR && \
|
||||
chmod 700 $HOME_DIR/.ssh && \
|
||||
chmod 600 $HOME_DIR/.ssh/id_rsa
|
||||
|
||||
USER $CONTAINER_USER
|
||||
COPY --chown=node:node package.json /tmp/package.json
|
||||
RUN eval `ssh-agent -s` && ssh-add $HOME_DIR/.ssh/id_rsa
|
||||
RUN cd /tmp && npm cache clean --force
|
||||
RUN cd /tmp && npm install
|
||||
|
||||
# Use the image without sshkey
|
||||
FROM "$IMAGE"
|
||||
LABEL description="nixplay-mobile-react"
|
||||
RUN mkdir -p $HOME_DIR/app
|
||||
COPY --from=intermediate /tmp/node_modules $HOME_DIR/app/node_modules
|
||||
COPY . $HOME_DIR/app/
|
||||
|
||||
WORKDIR $HOME_DIR/app
|
||||
|
||||
12
ioneapps-maagapp-ee31119a522d/docker/test.yml
Normal file
12
ioneapps-maagapp-ee31119a522d/docker/test.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
nixplay-mobile-react:
|
||||
build:
|
||||
context: ../
|
||||
container_name: mobile-react.test.nixplay.com
|
||||
image: nixplay/nixplay-mobile-react
|
||||
command: npm test
|
||||
volumes:
|
||||
- ../:/home/node/app
|
||||
- /home/node/app/node_modules
|
||||
Reference in New Issue
Block a user