Skip to content

Commit d8966ec

Browse files
committed
main: Update Dockerfile, add dlv config
1 parent 4e4bb29 commit d8966ec

File tree

4 files changed

+67
-6
lines changed

4 files changed

+67
-6
lines changed

Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
FROM golang:1.18-alpine
1+
FROM golang:1.19.3-alpine3.15
22
LABEL org.opencontainers.image.source https://github.com/avkosme/hugo-dev
33

4-
RUN apk add --no-cache git rsync sshpass hugo ansible npm openssh-client make g++ python3 curl py3-pip nftables openssl protoc
4+
RUN apk add --no-cache git rsync sshpass hugo ansible npm openssh-client make g++ python3 curl py3-pip nftables openssl protoc tzdata vim
55
RUN ln -s /usr/bin/python3 /usr/bin/python
66
RUN git clone https://github.com/sshuttle/sshuttle.git && cd sshuttle/ && ./setup.py install
7+
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.49.0
78
RUN git clone https://github.com/go-delve/delve && cd delve && go install github.com/go-delve/delve/cmd/dlv && go build -o /usr/bin/dvl cmd/dlv/main.go
8-
RUN go install github.com/golangci/golangci-lint/cmd/[email protected]
9+
910
RUN go install google.golang.org/protobuf/cmd/[email protected]
1011
RUN go install google.golang.org/grpc/cmd/[email protected]
1112
RUN go install golang.org/x/vuln/cmd/govulncheck@latest
1213
RUN apk add docker
1314
RUN DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} && mkdir -p $DOCKER_CONFIG/cli-plugins && curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose && chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
14-
RUN go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
15+
RUN go install -tags 'postgres,mysql' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
16+
RUN go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
17+
RUN go install golang.org/x/tools/gopls@latest
18+
RUN git clone https://github.com/fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go
19+
COPY conf/dlv/config.yml /root/.config/dlv/config.yml

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
docker build -t "ghcr.io/avkosme/hugo-dev" .
2+
docker build -t "ghcr.io/avkosme/hugo-dev:latest" .
33
push:
44
docker push ghcr.io/avkosme/hugo-dev:latest
55

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
# Hugo static site generator docker image
1+
# Golang app docker image for developing
22

33
Use for dev, test, deploy
44

55
## Docker Pull Command
66

7+
✅ Native Apple Silicon Support
8+
9+
```
10+
$ docker pull ghcr.io/avkosme/hugo-dev:arm
11+
```
12+
713
```
814
$ docker pull ghcr.io/avkosme/hugo-dev:latest
915
```

conf/dlv/config.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Configuration file for the delve debugger.
2+
3+
# This is the default configuration file. Available options are provided, but disabled.
4+
# Delete the leading hash mark to enable an item.
5+
6+
# Uncomment the following line and set your preferred ANSI color for source
7+
# line numbers in the (list) command. The default is 34 (dark blue). See
8+
# https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit
9+
# source-list-line-color: "\x1b[34m"
10+
11+
# Uncomment the following lines to change the colors used by syntax highlighting.
12+
# source-list-keyword-color: "\x1b[0m"
13+
# source-list-string-color: "\x1b[92m"
14+
# source-list-number-color: "\x1b[0m"
15+
# source-list-comment-color: "\x1b[95m"
16+
# source-list-arrow-color: "\x1b[93m"
17+
18+
# Uncomment to change the number of lines printed above and below cursor when
19+
# listing source code.
20+
# source-list-line-count: 5
21+
22+
# Provided aliases will be added to the default aliases for a given command.
23+
aliases:
24+
# command: ["alias1", "alias2"]
25+
26+
# Define sources path substitution rules. Can be used to rewrite a source path stored
27+
# in program's debug information, if the sources were moved to a different place
28+
# between compilation and debugging.
29+
# Note that substitution rules will not be used for paths passed to "break" and "trace"
30+
# commands.
31+
substitute-path:
32+
# - {from: path, to: path}
33+
34+
# Maximum number of elements loaded from an array.
35+
# max-array-values: 64
36+
37+
# Maximum loaded string length.
38+
max-string-len: 1024
39+
40+
# Output evaluation.
41+
# max-variable-recurse: 1
42+
43+
# Uncomment the following line to make the whatis command also print the DWARF location expression of its argument.
44+
# show-location-expr: true
45+
46+
# Allow user to specify output syntax flavor of assembly, one of this list "intel"(default), "gnu", "go".
47+
# disassemble-flavor: intel
48+
49+
# List of directories to use when searching for separate debug info files.
50+
debug-info-directories: ["/usr/lib/debug/.build-id"]

0 commit comments

Comments
 (0)