toolboxes/Dockerfile.vscode

60 lines
1.5 KiB
Docker

FROM fedora:latest as base
LABEL com.github.containers.toolbox="true"
# Install base packages
COPY base-packages.txt /
RUN dnf -y upgrade \
&& dnf install -y $(<base-packages.txt) \
&& dnf clean -y all
RUN rm /base-packages.txt
# Squash image to reduce final size
FROM scratch as squashed
COPY --from=base / /
FROM squashed
# Install vscode repo
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
RUN echo -e "\
[code]\n\
name=Visual Studio Code\n\
baseurl=https://packages.microsoft.com/yumrepos/vscode\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://packages.microsoft.com/keys/microsoft.asc\n\
" > /etc/yum.repos.d/vscode.repo
# Install packages
RUN dnf install -y \
code \
golang \
neovim \
pinentry \
pipx \
pre-commit \
python3 \
zsh \
&& dnf clean -y all
# Install some python tools
RUN PIPX_HOME=/usr/local/lib/pipx PIPX_BIN_DIR=/usr/local/bin pipx install \
ipython \
pip-audit \
poetry \
&& rm -rf /root/.cache
# Install some go tools
ENV GOBIN=/usr/local/bin
RUN go install github.com/cweill/gotests/gotests@latest \
&& go install github.com/fatih/gomodifytags@latest \
&& go install github.com/go-delve/delve/cmd/dlv@latest \
&& go install github.com/haya14busa/goplay/cmd/goplay@latest \
&& go install github.com/josharian/impl@latest \
&& go install golang.org/x/tools/gopls@latest \
&& go install golang.org/x/vuln/cmd/govulncheck@latest \
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
&& go clean -cache \
&& rm -rf /root/go /root/.cache
ENV GOBIN=