Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: allow for different docker socket path in docker-based templates (#15035)#15049

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
phorcys420 merged 1 commit intomainfromdocker-socket-variable
Oct 12, 2024

Conversation

phorcys420
Copy link
Member

@phorcys420phorcys420 commentedOct 12, 2024
edited
Loading

This PRfixes#15035, I have tested it on my instance and it works as expected.

I have opted to default to null, that way we don't have to hardcode our own default and we let the Docker provider default to whatever it wants.
This has the downside that it makes the template a little less readable, but it has the upside that we don't have to update the default if for some reason it ever changes.

We could also do something like this, but I like it less.

variable"docker_socket" {default="unix:///var/run/docker.sock"description="Docker socket URI"type=string}provider"docker" {host=var.docker_socket}

I have not edited the templates that are not present in examples/templates (namelyexamples/jfrog/docker andexamples/parameters), should I also edit these as well?
Maybe we would also want to move them to examples/templates in a separate PR?


NOTE: this PR does not cover using authenticated sources, so it's likely that only unix and tcp sockets would work out of the box but I think we don't want to include authenticated sockets OOTB (e.g SSH) because that would overcomplicate the template.

cc:@matifali

@phorcys420
Copy link
MemberAuthor

(behavior when an invalid Docker socket is inputted)
image


(behavior when a valid Docker socket is inputted)
image

@phorcys420phorcys420 changed the titlefix: allow for different docker socket path in docker-based templates (#15035)feat: allow for different docker socket path in docker-based templates (#15035)Oct 12, 2024
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

This brings the template motion line with the kubernetes starter template 👍

phorcys420 reacted with heart emoji
@matifali
Copy link
Member

How will it work for ssh docker hosts? Have you tested?

@phorcys420phorcys420 merged commit79d24d2 intomainOct 12, 2024
30 checks passed
@phorcys420phorcys420 deleted the docker-socket-variable branchOctober 12, 2024 19:35
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsOct 12, 2024
@phorcys420
Copy link
MemberAuthor

How will it work for ssh docker hosts? Have you tested?

@matifali I have not tested it but when using SSH hosts you always have to either trust the host or disable host checking.
you also need to have a valid public key on the remote host but theoretically it should work OOTB if you trust the host beforehand and have a valid key.

seehttps://registry.terraform.io/providers/kreuzwerker/docker/latest/docs#remote-hosts

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@matifalimatifalimatifali approved these changes

@bpmctbpmctAwaiting requested review from bpmct

Assignees

@phorcys420phorcys420

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Add a variable to ask for socket in Docker-based example templates
3 participants
@phorcys420@matifali@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp