43 lines
1.0 KiB
Docker
43 lines
1.0 KiB
Docker
FROM debian:12
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
git \
|
|
vim \
|
|
wget \
|
|
unzip \
|
|
make \
|
|
gcc \
|
|
build-essential \
|
|
openssh-server
|
|
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV GO_VERSION=1.21.3
|
|
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
|
|
|
|
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"]
|
|
CMD ["bash"]
|