Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Go-dexec example

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, go
Domain
documentation

Research direction

Start by reviewing the Go example in this issue and the repository's existing example or documentation structure. Confirm where a go-dexec demonstration belongs and what the completed example should show, then verify that the documented Docker usage matches the intended demo.

Written by the indexing model from the issue text.

Description

Example using go-dexec i'll probably demo...

package main

import (

    "net/http"
    "github.com/fsouza/go-dockerclient"
    "log"

    "github.com/ahmetalpbalkan/dexec"

    "io"
    "fmt"
)

func hello(w http.ResponseWriter, r *http.Request) {
    cl, _ := docker.NewClient("unix:///var/run/docker.sock")
    d := dexec.Docker{cl}

    m, _ := dexec.ByCreatingContainer(docker.CreateContainerOptions{
        Config: &docker.Config{Image: "busybox"}})

    cmd := d.Command(m, "echo", `I am running inside a container!`)
    b, err := cmd.Output()
    if err != nil { log.Fatal(err) }
    log.Printf("%s", b)
    io.WriteString(w, fmt.Sprintf("%s", b))

}

func main() {
    http.HandleFunc("/", hello)
    http.ListenAndServe(":8000", nil)
}
Dominant language
No language data
Stars
307
Forks
20
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bfirsh/serverless-docker

All issues in bfirsh/serverless-docker

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.