Docker 比特桶管道中的Nginx

Docker 比特桶管道中的Nginx,docker,nginx,continuous-integration,bitbucket,bitbucket-pipelines,Docker,Nginx,Continuous Integration,Bitbucket,Bitbucket Pipelines,我正在尝试使用Bitbucket管道运行web服务器 这是迄今为止我的bitbucket-pipelines.yml: image: php:latest pipelines: default: - step: caches: - composer script: - apt-get update && apt-get install -y unzip - curl -sS

我正在尝试使用Bitbucket管道运行web服务器

这是迄今为止我的bitbucket-pipelines.yml:

image: php:latest

pipelines:
  default:
    - step:
        caches:
          - composer
        script:
          - apt-get update && apt-get install -y unzip
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - composer install
          - vendor/bin/behat --colors --format=pretty --out=std
        services:
          - selenium
          - nginx

definitions:
  services:
    selenium:
      hostname: selenium
      image: selenium/standalone-chrome:latest
    nginx:
      image: nginx
现在,如果我转到,我可以看到默认的Nginx页面

我如何在存储库中提供一些文件,而不是那样?
是否可以将文件复制到Nginx容器?

尝试使用Apache2实现同样的功能。您能在图像中看到
/opt/atlassian/pipelines/agent/build
中的文件吗?我想这是Bitbucket将回购文件放入的目录。是的,我的文件在那里。我想以某种方式将这些文件复制到Nginx容器。您可以使用
docker
本机而不是
services
。然后,您可以将该目录装载到容器本身,作为
docker run
命令的一部分。实际上,我正在使用
docker compose
命令来构建服务和它们之间的链接,并将提供此功能的文件装载到
卷中:
-$BITBUCKET\u CLONE\u DIR:/your/location