diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9a1e047 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM golang:1.21.12 +RUN apt-get update && \ + apt-get install -y git neovim make +WORKDIR /app +COPY go.mod go.sum / +RUN go mod download +COPY . . +RUN make install +ENTRYPOINT sh + diff --git a/README.md b/README.md index 83ad519..2297e6e 100644 --- a/README.md +++ b/README.md @@ -45,4 +45,13 @@ make sandbox # creates the directory and copies over from ~/.config make clean # removes directory ``` +### Docker +You can also run the docker container that will set up a barebones shell for you +to test dotctl with + +```sh +docker built -d dotctl-dev . +docker run -it dotctl-dev +dotctl status +``` diff --git a/cmd/init.go b/cmd/init.go index 3417bf9..7b0a059 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -67,7 +67,7 @@ func runInitCommand(cmd *cobra.Command, args []string) { log.Fatalf("Unable to create dotfile structure: %s", error.Error(err)) } - _, err = fs.Create(path.Join(DotfilePath, "dotctl/config")) + _, err = fs.Create(path.Join(DotfilePath, "dotctl/config.yml")) if err != nil { panic(fmt.Errorf("Unable to create config file %w", err)) } diff --git a/test/init_test.go b/test/init_test.go index 414e3eb..b7ff657 100644 --- a/test/init_test.go +++ b/test/init_test.go @@ -27,7 +27,7 @@ func TestInitCommand(t *testing.T) { homedir := os.Getenv("HOME") - _, err := afero.ReadFile(fs, filepath.Join(homedir, "dotfiles/dotctl/config")) + _, err := afero.ReadFile(fs, filepath.Join(homedir, "dotfiles/dotctl/config.yml")) if err != nil { t.Error(err.Error()) }