-
-
Save KevinVitale/2379230e0b9c1d619dea2d14f4a61719 to your computer and use it in GitHub Desktop.
Docker with COBOL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
#update and get pre-requisites | |
RUN apt-get update && apt-get install -y \ | |
open-cobol \ | |
gcc | |
#copy file to image | |
COPY helloworld.cbl /helloworld.cbl | |
#compile the code | |
RUN cobc -x -free -o helloworld helloworld.cbl | |
#run | |
CMD ["/helloworld"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. HELLO-WORLD. | |
*> My hello world program | |
PROCEDURE DIVISION. | |
DISPLAY 'Hello world from COBOL'. | |
STOP RUN. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment