FROM alpine

RUN apk add --no-cache py-pip && apk add --no-cache yarn && apk add --no-cache bash  && apk add --update nodejs npm
RUN pip install --upgrade pip
RUN pip install awscli
RUN npm config set unsafe-perm true
RUN npm install dynamodb-admin -g

COPY . /var/fill/mock
WORKDIR /var/fill

EXPOSE 8000
EXPOSE 8001
ENV AWS_ACCESS_KEY_ID=accessKey1
ENV AWS_SECRET_ACCESS_KEY=verySecretKey1
ENV DYNAMO_ENDPOINT=http://dynamo-local:8000

ENTRYPOINT ["/bin/bash", "/var/fill/mock/scripts/init.sh"]
