"Fossies" - the Fresh Open Source Software Archive

Member "ponyc-0.33.2/INSTALL_DOCKER.md" (3 Feb 2020, 2639 Bytes) of package /linux/misc/ponyc-0.33.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Docker

Docker based Pony environments are available. The following tags are available:

If you prefer to use the Alpine images, you can use the following tags:

The docker images also include common Pony tools like ponyup, corral, and changelog-tool.

Using Pony from Docker

You’ll need to install Docker using the instructions here. Then you can pull a pony docker image using the following command (where TAG is the tag you want to use)

docker pull ponylang/ponyc:TAG

Then you’ll be able to run ponyc to compile a Pony program in a given directory, running a command like this:

docker run -v /path/to/my-code:/src/main ponylang/ponyc:TAG

If you’re unfamiliar with Docker, remember to ensure that whatever path you provide for /path/to/my-code is a full path name and not a relative path, and also note the lack of a closing slash, /, at the end of the path name.

Note that if your host doesn’t match the docker container, you’ll probably have to run the resulting program inside the docker container as well, using a command like this:

docker run -v /path/to/my-code:/src/main ponylang/ponyc:TAG ./main

To compile and run in one step run a command like this:

docker run -v /path/to/my-code:/src/main ponylang/ponyc:TAG sh -c "ponyc && ./main"

Docker for Windows

Pull an image as above:

docker pull ponylang/ponyc:TAG

Share a local drive (volume), such as c:, with Docker for Windows, so that they are available to your containers. (Refer to shared drives in the Docker for Windows documentation for details.)

Then you’ll be able to run ponyc to compile a Pony program in a given directory, running a command like this:

docker run -v c:/path/to/my-code:/src/main ponylang/ponyc:TAG

Note the inserted drive letter. Replace with your drive letter as appropriate.

To run a program, run a command like this:

docker run -v c:/path/to/my-code:/src/main ponylang/ponyc:TAG ./main

To compile and run in one step run a command like this:

docker run -v c:/path/to/my-code:/src/main ponylang/ponyc:TAG sh -c "ponyc && ./main"