-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathDockerfile
45 lines (36 loc) · 1.66 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
# [Choice] Go version (use -bookworm, or -bullseye variants on local arm64/Apple Silicon): 1, 1.21, 1.20, 1-bookworm, 1.21-bookworm, 1.20-bookworm, 1-bullseye, 1.21-bullseye, 1.20-bullseye
ARG VARIANT=1-bookworm
FROM mcr.microsoft.com/devcontainers/go:1-${VARIANT} AS base
# ==================================================================
# This needs to be kept in sync with the install-tools target of the Makefile
FROM base AS tools
RUN export GOBIN=/tmp/tools \
&& go install github.com/vektra/mockery/[email protected] \
&& go install github.com/golangci/golangci-lint/cmd/[email protected] \
&& go install golang.org/x/tools/cmd/[email protected] \
&& go install mvdan.cc/[email protected]
# ==================================================================
FROM base AS dev
# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
emacs-nox \
fzf \
libssl-dev \
pipenv \
postgresql-client \
python-is-python3 \
python3-dev \
python3-pip \
python3-venv \
ripgrep \
sqlite3
# Install tools
COPY --from=tools /tmp/tools /usr/local/bin
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
# Install xh
RUN curl -sfL https://raw.githubusercontent.com/ducaale/xh/master/install.sh | XH_BINDIR=/usr/local/bin sh
# Add docker-compose symlink to Docker Compose v2
# This is a workaround until https://github.com/devcontainers/features/pull/621 lands
RUN ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/