docker - The input device is not a TTY when I'm using docker?
问题描述
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?
解决方案
推荐阅读
- regex - 使用正则表达式查找具有特定内容的json
- php - Laravel 从 MessageSending 事件中获取邮件类名
- three.js - 鼠标悬停时重新渲染对象
- youtube - 为什么 Youtube API 的日程安排视频不起作用?
- javascript - 如何将 web3.eth.sendSignedTransaction 之外的数据推送到数组
- google-earth - 从 Google 地球引擎导出数据集以在 Google 地球中使用
- java - 在单个 Pointcut 中获取不同注解的参数
- java - 在java中使用Itext仅将标题添加到第一个PDF页面
- amcharts - 将列的总标签添加到堆叠图表(xy 图表)
- powershell - 重命名文件名中包含曾祖父母、祖父母和父母的文件,不包括呼叫文件夹