New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile #20
base: master
Are you sure you want to change the base?
Add Dockerfile #20
Conversation
I'm not a contributor to this code base, but I hope this review is helpful. First off, I'm running Ubuntu 22.10. I'm also running Docker version 24.0.5, build ced0996. Following your instructions, docker builds successfully:
As your instructions suggest, I'm also able to connect to run a shell on the container. As a new user of this repository, I do find your addition of this Dockerfile to improve my user experience. That being the case, I suggest you copy your documentation from the pull-request message to somewhere more persistent, obviously following contribution standards (which I haven't personally finished reviewing). As a new user, I'd be very interested in documentation providing a some examples of suggested use patterns. For example, how could I use this docker image in Anyway, awesome work. |
tar | ||
RUN cd /sqlite \ | ||
&& git fetch \ | ||
&& git checkout version-3.45.1 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there some reason you're checking out this tag twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no other reason, simply because this Dockerfile is what we instructed the LLM to generate, and there may be a lack of checking for this step after the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dockerfile is what we instructed the LLM to generate
I think there's missing context that you could document in the pull-request message.
FROM ubuntu:20.04 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
WORKDIR /sqlite | ||
RUN apt-get update && apt-get install -y git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't assume you intend this Dockerfile to be distributed as a standalone artifact. Assuming you're fine with this file being stored at the root of this repository, you could just copy the files you need (including git files) and copy those contents into /sqlite
. Alternatively, you might assume the developer checks out the tag they want before building the docker image. As a new contributor, I'd be surprised that a particular version is enforced by the Dockerfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the features of our tool is that it allows the user to select a specific version when the tool starts running, so this version can be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our tool
Which tool?
zlib1g-dev \ | ||
tcl8.6-dev \ | ||
tar | ||
RUN cd /sqlite \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to change directory into /sqlite
after already setting WORKDIR
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the same reason as mentioned above, what we do is guide the LLM to generate, but it doesn't completely determine what it outputs. The purpose of our job is to help novice users get started with a project quickly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, so you're using AI to generate this Dockerfile
? I guess we really aren't necessary.
&& make \ | ||
&& make sqlite3.c \ | ||
&& make devtest | ||
EXPOSE 8080 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a sane default, but should this port be configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This port is a configurable value. It can be specified by the user before the tool starts running. If the user does not specify it, the tool looks for a possible port in the project file, and if it does not find one, it uses the default port. After the Dockerfile is generated, you can also modify the port number according to your needs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue that the configurability of the port is worth documenting.
@ferryman0608, I noticed that this repository is a mirror. I'm not sure you'll get adequate review from project maintainers. Please correct me if I'm wrong. |
Thanks for the suggestion, I'll try to find the original repository address. |
Yes, good luck. Again, I'm not a project maintainer, just some random programmer. The pull-request traffic on this repository is small relatively to the ubiquity of
This might be the canonical version control, but I can't find pull-request traffic. |
Type of Change: Feature
Explanation: In an effort to support the project's reach and user experience, I've developed a Dockerfile with the aim of streamlining the setup process and ensuring consistent environments across different platforms. This initiative is part of a larger project I'm working on, which leverages large language models to automatically generate Dockerfiles tailored for specific projects.
Usage:
Place the Dockerfile in the root directory of the project;
Run the following command in the root directory of the project to build the image: docker build -t <image_name> . ;
Run the following command to run the container: docker run -it <image_name> bash;
Attached to this PR is the Dockerfile I've proposed. I’m fully open to discussing any aspects of it and am willing to make necessary adjustments to better align with your project's goals and practices.
Thank you very much for considering this contribution.