0

I have a volume declaration in a service:

volumes:
  - .:/var/www

The service's container uses an entrypoint shell script to prepare resources (npm install and gulp build). It runs fine in Jet but the files created by the entrypoint aren't ever detected when it runs for real.

What is different about volumes on the actual service?

FatherShawn
  • 211
  • 2
  • 8

1 Answers1

1

The biggest difference between your local environment and the remote environment is that the build machines are created new every time.

Locally, you probably have npm modules and build files. Remotely, however, you won't have access to those. A way to test this with jet, is to download the repository and run directly without any initial build processes - just jet steps.

Container Files

- var
  |- www
     |- node_modules
        |- //installed modules   
     |- build
        |- //build files
     |- src
        |- //source files

Build Machine Files

- root_folder
  |- src
    |- //source files

The difficulty with volumes during the container runtime is that what ever is in your root directory will override what was created during the image build.

The volume mapping remotely is, in most cases, unnecessary. You want to test the container in complete isolation.

I would recommend removing the volumes directive in the codeship-services.yml file - this should solve your issue.

Kelly J Andrews
  • 5,083
  • 1
  • 19
  • 32