PharoView this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide)

Predefined Docker image for Pharo

There is a predefined docker image at:


Source are here (community managed):

How to use it:


Simple dockerfile

You can have a simple dockerfile like:
FROM pharo/image:61
RUN pharo /var/pharo/images/61/Pharo.image eval --save "ConfigurationOfZincHTTPComponents project latestVersion load: 'WebSocket'."
RUN pharo /var/pharo/images/61/Pharo.image eval --save "ZnServer startDefaultOn: 8080"


Chatroom example


FROM pharo/image:61

RUN pharo /var/pharo/images/61/Pharo.image eval --save "ConfigurationOfZincHTTPComponents project latestVersion load: 'WebSocket'."
RUN pharo /var/pharo/images/61/Pharo.image eval --save " \
        ZnServer startDefaultOn: 8080. \
        ZnServer default delegate \
                map: 'ws-chatroom-client' \
                to: [ :request | ZnResponse ok: (ZnEntity html: ZnWebSocketChatroomHandler clientHtml) ]; \
                map: 'ws-chatroom' \
                to: (ZnWebSocketDelegate map: 'ws-chatroom' to: ZnWebSocketChatroomHandler new)."



docker build -t chatroom .
docker run -p 8080 chatroom --no-quit


example image is running at: http://docker00.self.pharocloud.com:32769/ws-chatroom-client

-----------

Links to this Page