Skip to content

Instantly share code, notes, and snippets.

@davidroman0O
Last active July 19, 2024 21:57
Show Gist options
  • Save davidroman0O/6a52dda4143db5d46b2afce2bfda76f5 to your computer and use it in GitHub Desktop.
Save davidroman0O/6a52dda4143db5d46b2afce2bfda76f5 to your computer and use it in GitHub Desktop.
mgmt under osx with devcontainer

How to make the mgmt ready for devcontainer?

Pretty simple!

Just use that Dockerfile as target for your devcontainer with VSCode!

FROM ubuntu:latest
# Install dependencies
RUN apt-get update && \
apt-get install -y \
golang-go \
git \
build-essential \
curl \
vim \
wget \
&& apt-get clean
# Set environment variables for Go
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
# Install stringer and other required tools
RUN go install golang.org/x/tools/cmd/stringer@latest && \
go install github.com/blynn/nex@latest && \
go install golang.org/x/tools/cmd/goyacc@latest
# Install mgmt
RUN git clone https://github.com/purpleidea/mgmt.git /mgmt && \
cd /mgmt && \
make deps && \
make
RUN mv ./mgmt /usr/bin
WORKDIR /workspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment