Skip to content

Commit

Permalink
chore(hocus): added hocus developer env
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielChalk committed May 17, 2023
1 parent 54f2f85 commit 1badd21
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions hocus.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM hocusdev/workspace

ARG GO_VERSION="go1.20.4.linux-amd64.tar.gz"
ARG TF_VERSION="1.3.9"

RUN echo $GO_SOURCE_URL
RUN sudo apt-get update -yq

RUN sudo apt-get install -yq \
unzip \
gzip

RUN curl https://go.dev/dl/${GO_VERSION} -L -s --output /tmp/${GO_VERSION} \
&& sudo tar -C /usr/local -xzf /tmp/${GO_VERSION} \
&& sudo rm /tmp/${GO_VERSION} \
&& sudo ln -s /usr/local/go/bin/* /usr/local/bin \
&& go install honnef.co/go/tools/cmd/staticcheck@latest

# install tfenv and terraform version
RUN git clone --depth=1 https://github.com/tfutils/tfenv.git ~/.tfenv \
&& sudo ln -s ~/.tfenv/bin/* /usr/local/bin \
&& tfenv install ${TF_VERSION} \
&& tfenv use ${TF_VERSION}

# test
RUN go version && terraform version
13 changes: 13 additions & 0 deletions hocus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
image:
buildContext: .
file: hocus.Dockerfile
tasks:
- name: go
prebuild: go mod download
vscode:
extensions:
- EditorConfig.EditorConfig
- esbenp.prettier-vscode
- golang.go
- ms-vscode.makefile-tools
- redhat.vscode-yaml

0 comments on commit 1badd21

Please sign in to comment.