-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (42 loc) · 1.89 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
# Copyright © Observerly Ltd.
# //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #
FROM golang:1.23-bookworm AS development
# //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #
# Install necessary packages: gcc, make, libc-dev, bash, curl, and openssh-client
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
curl \
gcc \
git \
libc-dev \
make \
openssh-client \
unzip \
wget \
zsh \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory to /usr/src/app
WORKDIR /usr/src/app
# Ensure staticcheck is executable and in the PATH
RUN go install honnef.co/go/tools/cmd/staticcheck@latest
# Ensure go-critic is executable and in the PATH
RUN go install github.com/go-critic/go-critic/cmd/gocritic@latest
# Add Go binaries to PATH
ENV PATH="$PATH:$(go env GOPATH)/bin"
# Install Oh My Zsh non-interactively
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# Install zsh-in-docker non-interactively
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)" -- \
-t https://github.com/denysdovhan/spaceship-prompt \
-a 'SPACESHIP_PROMPT_ADD_NEWLINE="false"' \
-a 'SPACESHIP_PROMPT_SEPARATE_LINE="false"' \
-p git \
-p ssh-agent \
-p https://github.com/zsh-users/zsh-autosuggestions \
-p https://github.com/zsh-users/zsh-completions
# Copy application code
COPY . /usr/src/app/
# //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #
# Set the default shell to zsh
SHELL ["/bin/zsh", "-c"]
# //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #