-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.development
46 lines (35 loc) · 1.27 KB
/
Dockerfile.development
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
FROM ubuntu:22.04 as ubuntu-go
ENV PATH /usr/local/go/bin:$PATH
ENV GOLANG_VERSION 1.21.0
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
curl ca-certificates git \
# install cgo-related dependencies
g++ gcc libc6-dev make pkg-config
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
curl -OL https://golang.org/dl/go${GOLANG_VERSION}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvf go${GOLANG_VERSION}.linux-${arch}.tar.gz
ENV GOPATH /go
ENV PATH $GOPATH/bin:$PATH
RUN mkdir -p "${GOPATH}/src" "${GOPATH}/bin" && chmod -R 777 "${GOPATH}"
RUN go version
##############################
# Base dev image #
##############################
FROM ubuntu-go
RUN apt-get install -y \
git \
jq \
# Install libproj 8.2.1
libproj-dev \
# Graphviz is needed for pprof
graphviz
# Install zsh
# Default powerline10k theme, no plugins installed
RUN sh -c "$(curl -L https://github.com/deluan/zsh-in-docker/releases/download/v1.1.5/zsh-in-docker.sh)"
# Although it's set in Makefile, still set it here
# This way we can use vscode debug, which doesn't use make
ENV TIMEZONE_DB_DIR="/workspace/"
# Without this, we cannot find libproj
ENV LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"
WORKDIR /workspace