custom-dockerfile/dev-env/Dockerfile

43 lines
1.0 KiB
Docker
Raw Normal View History

2024-10-06 07:27:30 -04:00
FROM debian:12
RUN apt-get update && apt-get install -y \
curl \
git \
vim \
wget \
unzip \
make \
gcc \
2024-10-06 08:38:42 -04:00
build-essential \
openssh-server
2024-10-06 07:27:30 -04:00
2024-10-06 08:38:42 -04:00
RUN rm -rf /var/lib/apt/lists/*
ENV GO_VERSION=1.21.3
2024-10-06 07:27:30 -04:00
RUN curl -OL https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
RUN rm go${GO_VERSION}.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin
ENV GOPATH=/go
ENV PATH=$PATH:$GOPATH/bin
WORKDIR /workspace
RUN go install github.com/go-delve/delve/cmd/dlv@latest
RUN go install golang.org/x/tools/gopls@latest
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
RUN go install github.com/goreleaser/goreleaser/v2@latest
2024-10-06 08:38:42 -04:00
RUN mkdir /var/run/sshd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
EXPOSE 22
COPY start.sh /start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]
2024-10-06 07:27:30 -04:00
CMD ["bash"]