reflex icon indicating copy to clipboard operation
reflex copied to clipboard

Feature: Added Dockerfile to Create Docker Image Of Pynecone

Open SaarthakMaini opened this issue 2 years ago β€’ 3 comments

This PR involves:

  • Adding a Dockerfile
  • Building Docker Image For Pynecone

To Run The Container Locally Do The Following:

  • Install Docker On Your Local Machine
  • Clone the pynecone repository by running the command: git clone https://github.com/pynecone-io/pynecone.git
  • RUN: docker build -t pynecone . inside the Dockerfile Directory of the terminal
  • Then RUN: docker run -it -d -p 3000:3000 pynecone_image
  • After that you can see the Demo Webpage on http://localhost:3000 OR we can view the content by typing the following command in the terminal : curl http://localhost:3000

I would like to give the suggestion of pushing the Docker Image to DockerHub

SaarthakMaini avatar Jan 27 '23 16:01 SaarthakMaini

What do you think of the idea of building a multistage image? This would dramatically reduce the size of the container image.

r0b2g1t avatar Jan 27 '23 23:01 r0b2g1t

I would recommend to create a docerfile sample with which every Pynecone developer can build an optimised container image himself. To my eye, this Dockerfile produces an image that only produces a sample app and cannot be used for other projects. For this reason, I would not recommend pushing the resulting image to Docker Hub or any other public registry.

r0b2g1t avatar Jan 28 '23 00:01 r0b2g1t

In my option, we should combine RUN lines to single command, this result less layers and snaller image size.

FHU-yezi avatar Jan 28 '23 00:01 FHU-yezi

I have open another PR #387 with all the changes. There were too many changes that I should have described here.

r0b2g1t avatar Jan 29 '23 23:01 r0b2g1t

This PR could be closed #387 is merged already.

r0b2g1t avatar Jan 30 '23 10:01 r0b2g1t

The PR looks awesome @r0b2g1t !

If possible, I would love to get some feedback on how I can improve my skills and what I could have done better.πŸ˜ƒ

Thank You!

SaarthakMaini avatar Jan 31 '23 04:01 SaarthakMaini

The PR looks awesome @r0b2g1t !

If possible, I would love to get some feedback on how I can improve my skills and what I could have done better.πŸ˜ƒ

Thank You!

Thanks for working on that last PR @SaarthakMaini we really appreciate It. Many more issues we'll need help on to come and can definitely use your help. Sorry we were not able to merge in your pr we just accepted the other pr because it was finished and we were trying to get the release out by today.

We can sync on discord soon and decide more things to work on for the next release if you have time. Really appreciate your help and attention to detail its great to have contributors like you!πŸ™‚

Alek99 avatar Jan 31 '23 04:01 Alek99