{"id":136,"date":"2019-09-25T08:36:49","date_gmt":"2019-09-25T08:36:49","guid":{"rendered":"https:\/\/docs.theironnetwork.org\/reactify\/?page_id=136"},"modified":"2019-10-10T07:27:33","modified_gmt":"2019-10-10T07:27:33","slug":"create-a-docker-image","status":"publish","type":"page","link":"https:\/\/docs.theironnetwork.org\/reactify\/create-a-docker-image\/","title":{"rendered":"Create a Docker Image"},"content":{"rendered":"\n<p>Here are the step by step instructions to make a docker image.<\/p>\n\n\n\n<p><strong>1. Install docker container in your machine.<\/strong><\/p>\n\n\n\n<div class=\"custom-sec-wrap mb-4\">\n\t<a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-and-use-docker-getting-started\" class=\"link-wrap\">\n\t\t<div class=\"content-wrap\">\n\t\t\t<h6>How To Install and Use Docker: Getting Started | DigitalOcean<\/h6>\n\t\t\t<p style=\"font-weight:400;\">In this DigitalOcean article, we aim to thoroughly introduce the reader to docker\u2013 one of the most exciting and powerful open-source projects to come to life in the recent years. Docker helps people with porting applications across systems and machine<\/p>\n\t\t\t<small>www.digitalocean.com<\/small>\n\t\t<\/div>\n\t\t<div style=\"background-image:url('https:\/\/community-cdn-digitalocean-com.global.ssl.fastly.net\/assets\/tutorials\/images\/large\/12122013Docker_twitter.png?1426699613');\" class=\"ironthm-img-item\"><\/div>\n\t<\/a>\n<\/div>\n\n\n\n<p><strong>2<\/strong>.<strong> Create a <\/strong><code>Dockerfile<\/code><strong> under the project file.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> # You should always specify a full version here to ensure all of your developers<br># are running the same version of Node.<br>FROM node:8.11.2<br> <br># The base node image sets a very verbose log level.<br>ENV NPM_CONFIG_LOGLEVEL warn<br> <br># Copy all local files into the image.<br>COPY . .<br> <br># install<br>RUN npm install<br> <br># Build for production.<br>RUN npm run build<br> <br># Set the command to start the node server.<br>CMD serve -s dist<br> <br># Tell Docker about the port we'll run on.<br>EXPOSE 5000 <\/pre>\n\n\n\n<p><strong>2.<\/strong> <strong>Build your image by running<\/strong> <code>docker build -t reactify-docker .<\/code> .<\/p>\n\n\n\n<p><strong>3. Verify that it\u2019s working by running <\/strong><code>docker run -it\u200a--rm -p 5000:5000\u200a--name reactify-docker reactify-docker<\/code><\/p>\n\n\n\n<p>Check more details about it.  <\/p>\n\n\n\n<div class=\"custom-sec-wrap mb-4\">\n\t<a href=\"https:\/\/medium.com\/ai2-blog\/dockerizing-a-react-application-3563688a2378\" class=\"link-wrap\">\n\t\t<div class=\"content-wrap\">\n\t\t\t<h6>Dockerizing a React application<\/h6>\n\t\t\t<p>Late last year I was working with our Semantic Scholar team to migrate the online stack from a bare-metal system to a system running\u2026<\/p>\n\t\t\t<small>medium.com<\/small>\n\t\t<\/div>\n\t<\/a>\n<\/div>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\n    <div class=\"pld-like-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-like-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"136\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-ip-check=\"0\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-up\"><\/i>\n                    <\/a>\n    <span class=\"pld-like-count-wrap pld-count-wrap\">1    <\/span>\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-dislike-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"136\" data-trigger-type=\"dislike\" data-ip-check=\"0\" data-restriction=\"cookie\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-down\"><\/i>\n                    <\/a>\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\n<\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Here are the step by step instructions to make a docker image. 1. Install docker container in your machine. How To Install and Use Docker: Getting Started | DigitalOcean In this DigitalOcean article, we aim to thoroughly introduce the reader to docker\u2013 one of the most exciting and powerful open-source projects to come to life [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":36,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages\/136"}],"collection":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":5,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages\/136\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/pages\/136\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/docs.theironnetwork.org\/reactify\/wp-json\/wp\/v2\/media?parent=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}