1

I'm currently running the following command:

docker run -it -v $PWD:/e2e -w /e2e cypress/included:6.2.1 

Error Message:

+ docker run -it -v %cd%:/e2e -w /e2e cypress/included:6.2.1
the input device is not a TTY

I'm pulling the cypress container from the Cypress Github Account

My bitbucket-pipelines.yaml file:


image: atlassian/default-image:2

pipelines:
  default:
    - step:
        services:
          - docker
        script:
          - docker run -it -v %cd%:/e2e -w /e2e cypress/included:6.2.1

My dockerfile:


FROM cypress/browsers:node12.18.3-chrome87-ff82


ENV CI=1


ENV QT_X11_NO_MITSHM=1
ENV _X11_NO_MITSHM=1
ENV _MITSHM=0

# should be root user
RUN echo "whoami: $(whoami)"
RUN npm config -g set user $(whoami)

# command "id" should print:
# uid=0(root) gid=0(root) groups=0(root)
# which means the current user is root
RUN id

# point Cypress at the /root/cache no matter what user account is used
# see https://on.cypress.io/caching
ENV CYPRESS_CACHE_FOLDER=/root/.cache/Cypress
RUN npm install -g "cypress@6.2.1"
RUN cypress verify

# Cypress cache and installed version
# should be in the root user's home folder
RUN cypress cache path
RUN cypress cache list
RUN cypress info
RUN cypress version

# give every user read access to the "/root" folder where the binary is cached
# we really only need to worry about the top folder, fortunately
RUN ls -la /root
RUN chmod 755 /root

# always grab the latest NPM and Yarn
# otherwise the base image might have old versions
RUN npm i -g yarn@latest npm@latest

# should print Cypress version
# plus Electron and bundled Node versions
RUN cypress version
RUN echo  " node version:    $(node -v) \n" \
  "npm version:     $(npm -v) \n" \
  "yarn version:    $(yarn -v) \n" \
  "debian version:  $(cat /etc/debian_version) \n" \
  "user:            $(whoami) \n" \
  "chrome:          $(google-chrome --version || true) \n" \
  "firefox:         $(firefox --version || true) \n"

ENTRYPOINT ["cypress", "run"]

If I run this command:

docker run -it -v %cd%:/e2e -w /e2e cypress/included:6.2.1

It will tell me that it cannot find my son file, and I don't why. Could someone help me a little bit?

What should I have to do? & Why I'm getting this issue, I guess I don't understand what is TTY means?

Hvaandres
  • 755
  • 2
  • 12
  • 39
  • Because you are using Docker on windows and gitbash. – Mehraj Malik Jan 12 '21 at 04:39
  • I'm pretty new to docker & this is the error message + docker run -it -v %cd%:/e2e -w /e2e cypress/included:6.2.1 the input device is not a TTY – Hvaandres Jan 12 '21 at 04:48
  • 1
    If you are running this for a CI pipeline, you don't need `-it` because it's not interactive. – Gino Mempin Jan 12 '21 at 05:02
  • @GinoMempin Thanks, now it seems that is telling me the following `We looked but did not find a cypress.json file in this folder: /` The command that I'm running now is `docker run cypress/included:6.2.1 run --browser chrome` – Hvaandres Jan 12 '21 at 05:33

0 Answers0