Reputation: 3716
We would like to leverage the excellent catalogue of DockerFiles on DockerHub, but the team is not in a position to use Docker.
Is there any way to run a DockerFile as if it were a shell script against a machine?
For example, if I chose to run the Docker container ruby:2.4.1-jessie
against a server running only Debian Jessie, I'd expect it to ignore the FROM
directive but be able to set the environment from ENV
and run the RUN
commands from this Dockerfile: Github docker-library/ruby:2.4.1-jessie
Upvotes: 0
Views: 43
Reputation: 16315
A dockerfile assumes to be executed in an empty container or an image on which it builds (using FROM). The knowledge about the environment (specifically the file system and all the installed software) is important and running something similar outside of docker might have side effects because files are at places where no files are expected.
I wouldn't recomend it
Upvotes: 1