-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (37 loc) · 1.64 KB
/
Dockerfile
File metadata and controls
42 lines (37 loc) · 1.64 KB
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
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/devcontainers/base:ubuntu
# Copy CA certs and install Ruby and Go via Ubuntu packages (much faster than building from source)
# Also install development libraries needed for Python compilation via asdf
RUN apt-get update && apt-get install -y \
ca-certificates \
ruby-full \
ruby-dev \
build-essential \
golang-go \
libsqlite3-dev \
libbz2-dev \
libncurses-dev \
libffi-dev \
libreadline-dev \
liblzma-dev \
libssl-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
COPY custom-ca-certs/. /usr/local/share/ca-certificates/
RUN update-ca-certificates
# Use the updated system CA bundle which now includes both system and custom CAs
ENV NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt"
ENV SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"
ENV REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"
ENV CURL_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"
ENV GIT_SSL_CAINFO="/etc/ssl/certs/ca-certificates.crt"
# Set Go environment variables and prepend asdf shims/bin to PATH
ENV GOPATH="/home/vscode/go"
ENV PATH="/home/vscode/.asdf/shims:/home/vscode/.asdf/bin:/go/bin:${GOPATH}/bin:${PATH}"
# Ensure CA Certs is available for all shells, Node, Python & Ruby
USER vscode
RUN echo 'NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
RUN echo 'SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
RUN echo 'REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
RUN echo 'CURL_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
RUN echo 'GIT_SSL_CAINFO="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc