-
Notifications
You must be signed in to change notification settings - Fork 44
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
Debug docker image #2294
Closed
+44
−4
Closed
Debug docker image #2294
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# syntax=docker.io/docker/dockerfile:1.7-labs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, I didn't know about this :-) |
||
# Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically this should be 2024. |
||
# All rights reserved. | ||
# | ||
# Use of this software is governed by the Business Source License | ||
# included in the LICENSE file. | ||
# | ||
# As of the Change Date specified in that file, in accordance with | ||
# the Business Source License, use of this software will be governed | ||
# by the Apache License, Version 2.0. | ||
|
||
# This docker file is mainly used to build a local docker image | ||
# with restate binary to run sdk tests | ||
|
||
FROM ghcr.io/restatedev/dev-tools:latest AS builder | ||
WORKDIR /usr/src/app | ||
COPY --exclude=.git . . | ||
RUN \ | ||
--mount=type=cache,target=/usr/src/app/target,sharing=locked \ | ||
--mount=type=cache,target=/usr/src/app/cargo-home,sharing=locked \ | ||
du -sh target && du -sh cargo-home && \ | ||
CARGO_HOME=/usr/src/app/cargo-home just libc=gnu build --bin restate-server && \ | ||
cp target/debug/restate-server restate-server && \ | ||
du -sh target && du -sh cargo-home | ||
|
||
# We do not need the Rust toolchain to run the server binary! | ||
FROM debian:bookworm-slim AS runtime | ||
COPY --from=builder /usr/src/app/restate-server /usr/local/bin | ||
# copy OS roots | ||
COPY --from=builder /etc/ssl /etc/ssl | ||
WORKDIR / | ||
ENTRYPOINT ["/usr/local/bin/restate-server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/.idea | ||
docker/Dockerfile | ||
**/target | ||
restate.tar | ||
charts |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ docker_repo := "localhost/restatedev/restate" | |
docker_tag := if path_exists(justfile_directory() / ".git") == "true" { | ||
`git rev-parse --abbrev-ref HEAD | sed 's|/|.|g'` + "." + `git rev-parse --short HEAD` | ||
} else { | ||
"unknown" | ||
"latest" | ||
} | ||
docker_image := docker_repo + ":" + docker_tag | ||
|
||
|
@@ -135,7 +135,10 @@ verify: lint test doctest | |
|
||
docker: | ||
# podman builds do not work without --platform set, even though it claims to default to host arch | ||
docker buildx build . --platform linux/{{ _docker_arch }} --file docker/Dockerfile --tag={{ docker_image }} --progress='{{ DOCKER_PROGRESS }}' --build-arg RESTATE_FEATURES={{ features }} --load | ||
docker buildx build . --platform linux/{{ _docker_arch }} --file docker/release.Dockerfile --tag={{ docker_image }} --progress='{{ DOCKER_PROGRESS }}' --build-arg RESTATE_FEATURES={{ features }} --load | ||
|
||
debug-docker: | ||
docker buildx build . --file docker/debug.Dockerfile --tag={{ docker_image }} --progress='{{ DOCKER_PROGRESS }}' --build-arg RESTATE_FEATURES={{ features }} --load | ||
|
||
notice-file: | ||
cargo license -d -a --avoid-build-deps --avoid-dev-deps {{ _features }} | (echo "Restate Runtime\nCopyright (c) 2024 Restate Software, Inc., Restate GmbH <[email protected]>\n" && cat) > NOTICE | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 a convention to use a capital
D
for theDockerfile
file suffix?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.
yes
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.
Yes. It's per their documentation