-
Notifications
You must be signed in to change notification settings - Fork 258
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
ci: fix docker #1444
ci: fix docker #1444
Conversation
WalkthroughThe update focuses on refining the Docker CI process and transitioning the Dockerfile from a Rust-based build to a simpler setup using Ubuntu and curl. It ensures the Docker images are correctly tagged with the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/ci.yml (2 hunks)
- Dockerfile (1 hunks)
Additional comments: 2
.github/workflows/ci.yml (2)
- 440-440: Ensure that the
APP_VERSION
environment variable is correctly derived from thedraft_release
job's output. This is crucial for consistent versioning across Docker images and other artifacts.- 465-467: The Docker image tagging strategy now includes dynamic versioning based on
APP_VERSION
and alatest
tag conditional on the version not ending with-SNAPSHOT
. Verify that this logic correctly reflects the intended versioning and publishing strategy, especially in scenarios where pre-release or snapshot versions are involved.
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.
Change PR title to ci: fix docker
for the checks to pass
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.
@neo773 can you send a screen recording where you have tested this |
Could you please provide some evidence that it's working, @neo773? |
@neo773 I am not able to build this docker file ERROR [3/3] RUN curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash -s 2.7s
------
> [3/3] RUN curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash -s:
1.366 bash: line 11: jq: command not found
------
Dockerfile:3
--------------------
1 | FROM ubuntu:latest
2 | RUN apt-get update && apt-get install -y curl
3 | >>> RUN curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash -s
4 | ENV PATH="${PATH}:~/.tailcall/bin"
5 |
--------------------
ERROR: failed to solve: process "/bin/sh -c curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash -s" did not complete successfully: exit code: 127 |
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.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/ci.yml (2 hunks)
- Dockerfile (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ci.yml
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.
Review Status
Actionable comments generated: 4
Configuration used: CodeRabbit UI
Files selected for processing (2)
- .github/workflows/ci.yml (2 hunks)
- Dockerfile (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .github/workflows/ci.yml
|
||
ENV TAILCALL_LOG_LEVEL=error | ||
CMD ["/bin/tailcall", "start", "jsonplaceholder.graphql"] | ||
FROM ubuntu:latest |
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.
Given the previous comment about pinning the Ubuntu version, it's advisable to specify a particular version of Ubuntu instead of using latest
. This ensures consistent and predictable builds.
- FROM ubuntu:latest
+ FROM ubuntu:20.04
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
FROM ubuntu:latest | |
FROM ubuntu:20.04 |
@@ -37,0 +1,4 @@ | |||
FROM ubuntu:latest | |||
RUN apt-get update && apt-get install -y curl jq |
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.
The addition of jq
addresses the build error mentioned in the PR comments. However, it's good practice to clean up the apt cache by adding && rm -rf /var/lib/apt/lists/*
at the end of the RUN
command to reduce the image size.
- RUN apt-get update && apt-get install -y curl jq
+ RUN apt-get update && apt-get install -y curl jq && rm -rf /var/lib/apt/lists/*
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
RUN apt-get update && apt-get install -y curl jq | |
RUN apt-get update && apt-get install -y curl jq && rm -rf /var/lib/apt/lists/* |
@@ -37,0 +1,4 @@ | |||
FROM ubuntu:latest | |||
RUN apt-get update && apt-get install -y curl jq | |||
RUN curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash -s |
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.
Considering the security concerns raised in the previous comments, it's crucial to verify the integrity of the script fetched from the internet. If possible, download the script, verify its checksum, and then execute it. This step is essential to ensure the security of the build process.
FROM ubuntu:latest | ||
RUN apt-get update && apt-get install -y curl jq | ||
RUN curl -sSL https://raw.githubusercontent.com/tailcallhq/tailcall/master/install.sh | bash -s | ||
ENV PATH="${PATH}:~/.tailcall/bin" |
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.
The use of ~
in the PATH
environment variable might not resolve correctly, as mentioned in the previous comments. It's better to use the absolute path to ensure that the tailcall
binary is correctly added to PATH
.
- ENV PATH="${PATH}:~/.tailcall/bin"
+ ENV PATH="${PATH}:/root/.tailcall/bin"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
ENV PATH="${PATH}:~/.tailcall/bin" | |
ENV PATH="${PATH}:/root/.tailcall/bin" |
This sets the tags explicitly using raw values
Issue Reference(s):
Fixes #1433
/claim #1433
Summary by CodeRabbit