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

Add a Dockerfile #11

Merged
merged 2 commits into from
Mar 5, 2021
Merged

Add a Dockerfile #11

merged 2 commits into from
Mar 5, 2021

Conversation

Krast76
Copy link

@Krast76 Krast76 commented Mar 3, 2021

Hi 👋 ,

This PR add a Dockerfile.

After building it, with this alias on your shell :

$ alias tfk8s='docker run -i --rm jrhouston/tfk8s:0.1.1'

You can use tfk8s without Go on your laptop :

$ kubectl run nginx --image=nginx --dry-run=client -o yaml | tfk8s
resource "kubernetes_manifest" "pod_nginx" {
  manifest = {
    "apiVersion" = "v1"
    "kind" = "Pod"
    "metadata" = {
      "creationTimestamp" = null
      "labels" = {
        "run" = "nginx"
      }
      "name" = "nginx"
    }
    "spec" = {
      "containers" = [
        {
          "image" = "nginx"
          "name" = "nginx"
          "resources" = {}
        },
      ]
      "dnsPolicy" = "ClusterFirst"
      "restartPolicy" = "Always"
    }
    "status" = {}
  }
}

@Krast76 Krast76 requested a review from jrhouston as a code owner March 3, 2021 09:23
@jrhouston
Copy link
Owner

Thanks for adding this @Krast76. I shuffled some things around so I could re-use the make build target inside the docker build container, that way the toolVersion argument doesn't have to be duplicated. I also added a docker-push target so I can push it to docker hub.

@jrhouston jrhouston merged commit 7bdc9ec into jrhouston:master Mar 5, 2021
@Krast76 Krast76 deleted the add-dockerfile branch February 2, 2022 09:22
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.

2 participants