mardi 24 septembre 2019

Jest-dynamoDB connection gets refused inside of docker container

I have a suite of tests written in Jest for dynamoDB that use the dynamodb-local instance as explained here using this dependency. I use a custom-built Docker image which builds a container within which the tests are executed. Here's the Dockerfile

FROM openjdk:8-jre-alpine

RUN apk -v --no-cache add \
    curl \
    build-base \
    groff \
    jq \
    less \
    py-pip \
    python openssl \
    python3 \
    python3-dev \
    yarn \
    && \
    pip3 install --upgrade pip awscli boto3 aws-sam-cli

EXPOSE 8000

I yarn install all of my dependencies and then yarn test, at this point after a long time it will output this: Error

This is the command I ma using: docker run -it --rm -p 8000:8000 -v $(pwd):/data -w /data aws-cli-java8-v15:latest

The tests work completely fine on my own machine, but no matter what project I use or what I include in my Dockerfile connection always gets dropped.

Aucun commentaire:

Enregistrer un commentaire