toolboxes/Dockerfile.vscode

62 lines
1.6 KiB
Docker
Raw Permalink Normal View History

2024-02-02 01:57:03 +00:00
FROM fedora:latest as base
2024-02-01 13:27:18 +00:00
2024-02-02 01:57:03 +00:00
# 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
2024-02-02 02:15:00 +00:00
LABEL com.github.containers.toolbox="true"
2024-02-01 15:03:31 +00:00
# Install vscode repo
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
2024-02-01 19:22:09 +00:00
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
2024-02-01 15:03:31 +00:00
2024-02-01 19:22:43 +00:00
# Install packages
2024-02-02 01:57:03 +00:00
RUN dnf install -y \
2024-02-01 15:03:31 +00:00
code \
golang \
2024-02-01 13:27:18 +00:00
neovim \
2024-02-01 15:03:31 +00:00
pinentry \
pipx \
2024-02-01 13:27:18 +00:00
python3 \
2024-02-01 15:03:31 +00:00
zsh \
&& dnf clean -y all
# Install some python tools
RUN PIPX_HOME=/usr/local/lib/pipx PIPX_BIN_DIR=/usr/local/bin pipx install \
2024-02-01 15:43:59 +00:00
ipython \
2024-02-01 19:22:43 +00:00
pip-audit \
2024-02-02 01:58:30 +00:00
pre-commit \
2024-02-01 19:22:43 +00:00
poetry \
2024-02-01 15:43:59 +00:00
&& rm -rf /root/.cache
2024-02-01 15:03:31 +00:00
# Install some go tools
ENV GOBIN=/usr/local/bin
2024-02-01 19:22:43 +00:00
RUN go install github.com/cweill/gotests/gotests@latest \
2024-02-01 15:03:31 +00:00
&& go install github.com/fatih/gomodifytags@latest \
2024-02-01 19:22:43 +00:00
&& go install github.com/go-delve/delve/cmd/dlv@latest \
2024-02-02 01:57:54 +00:00
&& go install github.com/go-task/task/v3/cmd/task@latest \
2024-02-01 19:22:43 +00:00
&& go install github.com/haya14busa/goplay/cmd/goplay@latest \
2024-02-01 15:03:31 +00:00
&& go install github.com/josharian/impl@latest \
2024-02-01 19:22:43 +00:00
&& go install golang.org/x/tools/gopls@latest \
2024-02-01 15:23:01 +00:00
&& go install golang.org/x/vuln/cmd/govulncheck@latest \
2024-02-01 19:22:43 +00:00
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
2024-02-01 15:43:59 +00:00
&& go clean -cache \
&& rm -rf /root/go /root/.cache
2024-02-01 13:27:18 +00:00
2024-02-01 15:03:31 +00:00
ENV GOBIN=