Skip to content

Instantly share code, notes, and snippets.

@KevinVitale
Forked from up1/Dockerfile
Created August 27, 2018 19:48
Show Gist options
  • Save KevinVitale/2379230e0b9c1d619dea2d14f4a61719 to your computer and use it in GitHub Desktop.
Save KevinVitale/2379230e0b9c1d619dea2d14f4a61719 to your computer and use it in GitHub Desktop.
Docker with COBOL
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"]
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