-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
56 lines (46 loc) · 1.33 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM golang:1.19.5-alpine3.17
RUN apk update && apk upgrade
RUN apk add --no-cache neovim neovim-doc git wl-clipboard gcc g++ wget curl \
bash gzip fzf fd ripgrep bat delta viu nodejs npm
# create user and directory for the app
arg UID=1000
arg GID=1000
ENV USR=nvim
ENV GRP=nvim
arg HOME=/home/"${USR}"
ARG WORKDIR=/app
RUN addgroup --gid "${GID}" "${GRP}"
RUN adduser \
-S \
-u "${UID}" \
-g "${GID}" \
-D "${USR}" \
-h "${HOME}" \
"${USR}"
RUN mkdir ${WORKDIR}
RUN chown -R ${USR}:${GRP} ${WORKDIR}
COPY ./config ${HOME}/.config
RUN chown -R ${USR}:${GRP} ${HOME}/.config
COPY ./.local ${HOME}/.local
RUN chown -R ${USR}:${GRP} ${HOME}/.local
USER nvim
#Install tools for golang
# Iferr snipet for iferr
RUN go install github.com/koron/iferr@latest
# Format long lines
RUN go install github.com/segmentio/golines@latest
# Format code
RUN go install mvdan.cc/gofumpt@latest
# Testsum
RUN go install gotest.tools/gotestsum@latest
# Autofill tags
RUN go install github.com/fatih/gomodifytags@latest
# Add Test Ginkgo
RUN go install github.com/onsi/ginkgo/v2/ginkgo@latest
# Add Tests
RUN go install github.com/cweill/gotests/gotests@latest
# Add a tool for answering questions about go source code
RUN go install golang.org/x/tools/cmd/guru@latest
# GOPLS
RUN go install golang.org/x/tools/gopls@latest
WORKDIR /app