Skip to content
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

chore: support debugging devnet process #23

Merged
merged 1 commit into from
Apr 12, 2023

Conversation

chokobole
Copy link
Contributor

This commit helps user to debug a process which is run by docker compose. Currently, this only works on Linux. There should be another way for macOS users.

Resolves: #11

@chokobole chokobole requested review from a team as code owners April 11, 2023 11:46
specs/meta/devnet.md Outdated Show resolved Hide resolved
Dockerfile Outdated
Comment on lines 16 to 22
# Node
FROM alpine:3.17 as kanvas-node
COPY --from=builder /app/bin/kanvas-node /usr/local/bin

RUN addgroup user && \
adduser -G user -s /bin/sh -h /home/user -D user && \
mkdir /kanvas_log/ && \
chown user:user /kanvas_log

USER user
WORKDIR /home/user/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to separate the stage for adding this.
Is this possible?

Suggested change
# Node
FROM alpine:3.17 as kanvas-node
COPY --from=builder /app/bin/kanvas-node /usr/local/bin
RUN addgroup user && \
adduser -G user -s /bin/sh -h /home/user -D user && \
mkdir /kanvas_log/ && \
chown user:user /kanvas_log
USER user
WORKDIR /home/user/
FROM alpine:3.17 as runner
RUN addgroup user && \
adduser -G user -s /bin/sh -h /home/user -D user && \
mkdir /kanvas_log/ && \
chown user:user /kanvas_log
USER user
WORKDIR /home/user/
# Node
FROM runner as kanvas-node
COPY --from=builder /app/bin/kanvas-node /usr/local/bin
...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code will not work and is for reference purposes only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove bolierplate, please review again!

Dockerfile Outdated Show resolved Hide resolved
This commit helps user to debug a process which is run by docker
compose. Currently, this only works on Linux. There should be another
way for macOS users.

Resolves: #11
@chokobole chokobole force-pushed the chore/support-debugging-devnet-process branch from e22b1f5 to 3deec73 Compare April 12, 2023 00:10
Copy link
Contributor

@Pangssu Pangssu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Pangssu Pangssu merged commit c963e6b into dev Apr 12, 2023
@Pangssu Pangssu deleted the chore/support-debugging-devnet-process branch April 12, 2023 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants