{"action":"created","issue":{"url":"https://api.github.com/repos/Jacajack/cmorse/issues/3","repository_url":"https://api.github.com/repos/Jacajack/cmorse","labels_url":"https://api.github.com/repos/Jacajack/cmorse/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Jacajack/cmorse/issues/3/comments","events_url":"https://api.github.com/repos/Jacajack/cmorse/issues/3/events","html_url":"https://github.com/Jacajack/cmorse/pull/3","id":191039015,"number":3,"title":"Dockerfile for Development and Testing","user":{"login":"jconard3","id":6401914,"avatar_url":"https://avatars.githubusercontent.com/u/6401914?v=3","gravatar_id":"","url":"https://api.github.com/users/jconard3","html_url":"https://github.com/jconard3","followers_url":"https://api.github.com/users/jconard3/followers","following_url":"https://api.github.com/users/jconard3/following{/other_user}","gists_url":"https://api.github.com/users/jconard3/gists{/gist_id}","starred_url":"https://api.github.com/users/jconard3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jconard3/subscriptions","organizations_url":"https://api.github.com/users/jconard3/orgs","repos_url":"https://api.github.com/users/jconard3/repos","events_url":"https://api.github.com/users/jconard3/events{/privacy}","received_events_url":"https://api.github.com/users/jconard3/received_events","type":"User","site_admin":false},"labels":[{"id":375309544,"url":"https://api.github.com/repos/Jacajack/cmorse/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-22T15:32:06Z","updated_at":"2016-11-22T19:44:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Jacajack/cmorse/pulls/3","html_url":"https://github.com/Jacajack/cmorse/pull/3","diff_url":"https://github.com/Jacajack/cmorse/pull/3.diff","patch_url":"https://github.com/Jacajack/cmorse/pull/3.patch"},"body":"Docker provides a platform-agnostic way to develop and test C code in linux environments. Using this dockerfile I can build an image with the cmorse source and compiled binaries. Additionally, it allows the cmorse compiled binary to be run and tested in a lightweight and disposable container.\r\n\r\nHere is me building the docker image from scratch using the submitted Dockerfile\r\n```\r\n~/cmorse dockerfile!\r\n $ docker build -t cmorse .\r\nSending build context to Docker daemon 249.3 kB\r\nStep 1 : FROM centos:7.2.1511\r\n ---> 686672a1d0cc\r\nStep 2 : RUN yum -y install  gcc                     make\r\n ---> Running in 6805f56b2ecd\r\nLoaded plugins: fastestmirror\r\nDetermining fastest mirrors\r\n * base: mirrors.tummy.com\r\n * extras: mirror.san.fastserv.com\r\n * updates: centos.chi.host-engine.com\r\nResolving Dependencies\r\n--> Running transaction check\r\n---> Package gcc.x86_64 0:4.8.5-4.el7 will be installed\r\n--> Processing Dependency: libgomp = 4.8.5-4.el7 for package: gcc-4.8.5-4.el7.x86_64\r\n--> Processing Dependency: cpp = 4.8.5-4.el7 for package: gcc-4.8.5-4.el7.x86_64\r\n--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-4.el7.x86_64\r\n--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-4.el7.x86_64\r\n--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-4.el7.x86_64\r\n--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.8.5-4.el7.x86_64\r\n---> Package make.x86_64 1:3.82-21.el7 will be installed\r\n--> Running transaction check\r\n---> Package cpp.x86_64 0:4.8.5-4.el7 will be installed\r\n---> Package glibc-devel.x86_64 0:2.17-106.el7_2.8 will be installed\r\n--> Processing Dependency: glibc-headers = 2.17-106.el7_2.8 for package: glibc-devel-2.17-106.el7_2.8.x86_64\r\n--> Processing Dependency: glibc = 2.17-106.el7_2.8 for package: glibc-devel-2.17-106.el7_2.8.x86_64\r\n--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-106.el7_2.8.x86_64\r\n---> Package libgomp.x86_64 0:4.8.5-4.el7 will be installed\r\n---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed\r\n---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed\r\n--> Running transaction check\r\n---> Package glibc.x86_64 0:2.17-105.el7 will be updated\r\n--> Processing Dependency: glibc = 2.17-105.el7 for package: glibc-common-2.17-105.el7.x86_64\r\n---> Package glibc.x86_64 0:2.17-106.el7_2.8 will be an update\r\n---> Package glibc-headers.x86_64 0:2.17-106.el7_2.8 will be installed\r\n--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-106.el7_2.8.x86_64\r\n--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-106.el7_2.8.x86_64\r\n--> Running transaction check\r\n---> Package glibc-common.x86_64 0:2.17-105.el7 will be updated\r\n---> Package glibc-common.x86_64 0:2.17-106.el7_2.8 will be an update\r\n---> Package kernel-headers.x86_64 0:3.10.0-327.36.3.el7 will be installed\r\n--> Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n================================================================================\r\n Package             Arch        Version                     Repository    Size\r\n================================================================================\r\nInstalling:\r\n gcc                 x86_64      4.8.5-4.el7                 base          16 M\r\n make                x86_64      1:3.82-21.el7               base         420 k\r\nInstalling for dependencies:\r\n cpp                 x86_64      4.8.5-4.el7                 base         5.9 M\r\n glibc-devel         x86_64      2.17-106.el7_2.8            updates      1.0 M\r\n glibc-headers       x86_64      2.17-106.el7_2.8            updates      663 k\r\n kernel-headers      x86_64      3.10.0-327.36.3.el7         updates      3.2 M\r\n libgomp             x86_64      4.8.5-4.el7                 base         130 k\r\n libmpc              x86_64      1.0.1-3.el7                 base          51 k\r\n mpfr                x86_64      3.1.1-4.el7                 base         203 k\r\nUpdating for dependencies:\r\n glibc               x86_64      2.17-106.el7_2.8            updates      3.6 M\r\n glibc-common        x86_64      2.17-106.el7_2.8            updates       11 M\r\n\r\nTransaction Summary\r\n================================================================================\r\nInstall  2 Packages (+7 Dependent packages)\r\nUpgrade             ( 2 Dependent packages)\r\n\r\nTotal download size: 43 M\r\nDownloading packages:\r\nDelta RPMs disabled because /usr/bin/applydeltarpm not installed.\r\nwarning: /var/cache/yum/x86_64/7/updates/packages/glibc-2.17-106.el7_2.8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY\r\nPublic key for glibc-2.17-106.el7_2.8.x86_64.rpm is not installed\r\nPublic key for cpp-4.8.5-4.el7.x86_64.rpm is not installed\r\n--------------------------------------------------------------------------------\r\nTotal                                               14 MB/s |  43 MB  00:03\r\nRetrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7\r\nImporting GPG key 0xF4A80EB5:\r\n Userid     : \"CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>\"\r\n Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5\r\n Package    : centos-release-7-2.1511.el7.centos.2.10.x86_64 (@CentOS)\r\n From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7\r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  Updating   : glibc-2.17-106.el7_2.8.x86_64                               1/13\r\n  Updating   : glibc-common-2.17-106.el7_2.8.x86_64                        2/13\r\n  Installing : mpfr-3.1.1-4.el7.x86_64                                     3/13\r\n  Installing : libmpc-1.0.1-3.el7.x86_64                                   4/13\r\n  Installing : cpp-4.8.5-4.el7.x86_64                                      5/13\r\n  Installing : libgomp-4.8.5-4.el7.x86_64                                  6/13\r\n  Installing : kernel-headers-3.10.0-327.36.3.el7.x86_64                   7/13\r\n  Installing : glibc-headers-2.17-106.el7_2.8.x86_64                       8/13\r\n  Installing : glibc-devel-2.17-106.el7_2.8.x86_64                         9/13\r\n  Installing : gcc-4.8.5-4.el7.x86_64                                     10/13\r\n  Installing : 1:make-3.82-21.el7.x86_64                                  11/13\r\n  Cleanup    : glibc-2.17-105.el7.x86_64                                  12/13\r\n  Cleanup    : glibc-common-2.17-105.el7.x86_64                           13/13\r\n  Verifying  : gcc-4.8.5-4.el7.x86_64                                      1/13\r\n  Verifying  : cpp-4.8.5-4.el7.x86_64                                      2/13\r\n  Verifying  : libgomp-4.8.5-4.el7.x86_64                                  3/13\r\n  Verifying  : mpfr-3.1.1-4.el7.x86_64                                     4/13\r\n  Verifying  : 1:make-3.82-21.el7.x86_64                                   5/13\r\n  Verifying  : glibc-devel-2.17-106.el7_2.8.x86_64                         6/13\r\n  Verifying  : glibc-headers-2.17-106.el7_2.8.x86_64                       7/13\r\n  Verifying  : libmpc-1.0.1-3.el7.x86_64                                   8/13\r\n  Verifying  : glibc-common-2.17-106.el7_2.8.x86_64                        9/13\r\n  Verifying  : glibc-2.17-106.el7_2.8.x86_64                              10/13\r\n  Verifying  : kernel-headers-3.10.0-327.36.3.el7.x86_64                  11/13\r\n  Verifying  : glibc-2.17-105.el7.x86_64                                  12/13\r\n  Verifying  : glibc-common-2.17-105.el7.x86_64                           13/13\r\n\r\nInstalled:\r\n  gcc.x86_64 0:4.8.5-4.el7               make.x86_64 1:3.82-21.el7\r\n\r\nDependency Installed:\r\n  cpp.x86_64 0:4.8.5-4.el7\r\n  glibc-devel.x86_64 0:2.17-106.el7_2.8\r\n  glibc-headers.x86_64 0:2.17-106.el7_2.8\r\n  kernel-headers.x86_64 0:3.10.0-327.36.3.el7\r\n  libgomp.x86_64 0:4.8.5-4.el7\r\n  libmpc.x86_64 0:1.0.1-3.el7\r\n  mpfr.x86_64 0:3.1.1-4.el7\r\n\r\nDependency Updated:\r\n  glibc.x86_64 0:2.17-106.el7_2.8     glibc-common.x86_64 0:2.17-106.el7_2.8\r\n\r\nComplete!\r\n ---> bfd30ea0fc01\r\nRemoving intermediate container 6805f56b2ecd\r\nStep 3 : RUN mkdir /opt/cmorse\r\n ---> Running in 3b4652b2ff3a\r\n ---> 7bc9ec5f8ddb\r\nRemoving intermediate container 3b4652b2ff3a\r\nStep 4 : COPY . /opt/cmorse\r\n ---> 6ce1fe575972\r\nRemoving intermediate container b28c62706b5b\r\nStep 5 : WORKDIR /opt/cmorse\r\n ---> Running in f01d4b07432d\r\n ---> 1bbb1e36a403\r\nRemoving intermediate container f01d4b07432d\r\nStep 6 : RUN make all\r\n ---> Running in 67ddb41ac025\r\nrm -rf bin\r\nmkdir bin\r\ngcc -Wall -o bin/cmorse src/cmorse.c\r\n ---> cad5a7b778ba\r\nRemoving intermediate container 67ddb41ac025\r\nStep 7 : RUN make install\r\n ---> Running in 1a72391006c4\r\nmkdir -p /usr\r\nmkdir -p /usr/bin\r\ncp -R bin/cmorse /usr/bin\r\n ---> b25139368356\r\nRemoving intermediate container 1a72391006c4\r\nSuccessfully built b25139368356\r\n```\r\n\r\nAnd here is me invoking the `cmorse` binary using a container based on the image...\r\n```\r\n~/cmorse dockerfile!\r\n $ docker run -it cmorse cmorse\r\nHello, World!\r\n.... . .-.. .-.. --- --..--  .-- --- .-. .-.. -.. -.-.--\r\n```"},"comment":{"url":"https://api.github.com/repos/Jacajack/cmorse/issues/comments/262344701","html_url":"https://github.com/Jacajack/cmorse/pull/3#issuecomment-262344701","issue_url":"https://api.github.com/repos/Jacajack/cmorse/issues/3","id":262344701,"user":{"login":"Jacajack","id":6173262,"avatar_url":"https://avatars.githubusercontent.com/u/6173262?v=3","gravatar_id":"","url":"https://api.github.com/users/Jacajack","html_url":"https://github.com/Jacajack","followers_url":"https://api.github.com/users/Jacajack/followers","following_url":"https://api.github.com/users/Jacajack/following{/other_user}","gists_url":"https://api.github.com/users/Jacajack/gists{/gist_id}","starred_url":"https://api.github.com/users/Jacajack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jacajack/subscriptions","organizations_url":"https://api.github.com/users/Jacajack/orgs","repos_url":"https://api.github.com/users/Jacajack/repos","events_url":"https://api.github.com/users/Jacajack/events{/privacy}","received_events_url":"https://api.github.com/users/Jacajack/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T19:44:00Z","updated_at":"2016-11-22T19:44:00Z","body":"I've never used Docker before (it looks pretty nice actually, I should give it a try). Unfortunately I have 32-bit  Ubuntu here, so I can't test if it works. \r\n\r\nAnyway, are you sure that configuration file you provided will run on systems other than Cent OS? It looks like it contains some distro-specific commands like `yum`.\r\n\r\n"}}
{"actor":{"display_login":"Jacajack"}}