-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
78 lines (57 loc) · 2.11 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# renovate: datasource=docker depName=ghcr.io/containerbase/base
ARG CONTAINERBASE_VERSION=10.11.1
FROM ghcr.io/containerbase/base:${CONTAINERBASE_VERSION} as containerbase
FROM ubuntu:22.04@sha256:19478ce7fc2ffbce89df29fea5725a8d12e57de52eb9ea570890dc5852aac1ac
ARG CONTAINERBASE_VERSION
ARG APT_HTTP_PROXY
LABEL org.opencontainers.image.source="https://github.com/containerbase/devcontainer" \
org.opencontainers.image.version="${CONTAINERBASE_VERSION}"
# Compatibillity
LABEL org.label-schema.vcs-url="https://github.com/containerbase/devcontainer" \
org.label-schema.version="${CONTAINERBASE_VERSION}"
ARG USER_NAME=vscode
ARG USER_ID=1000
ARG PRIMARY_GROUP_ID=1000
# Set env and shell
ENV BASH_ENV=/usr/local/etc/env ENV=/usr/local/etc/env PATH=/home/$USER_NAME/bin:$PATH
SHELL ["/bin/bash" , "-c"]
# This entry point ensures that dumb-init is run
ENTRYPOINT [ "docker-entrypoint.sh" ]
# Set up containerbase
COPY --from=containerbase /usr/local/bin/ /usr/local/bin/
COPY --from=containerbase /usr/local/containerbase/ /usr/local/containerbase/
RUN install-containerbase
# add required devcontainer and other system packages
RUN set -ex; \
install-apt \
g++ \
locales \
make \
shellcheck \
sudo \
; \
locale-gen en_US.UTF-8; \
true
# allow sudo without password
RUN set e; \
echo "$USER_NAME ALL = NOPASSWD: ALL" > /etc/sudoers.d/$USER_NAME; \
chmod 0440 /etc/sudoers.d/$USERNAME; \
sudo id; \
true
# renovate: datasource=github-tags packageName=git/git
RUN install-tool git v2.45.2
# mark all directories as safe
RUN git config --system --add safe.directory '*'
# renovate: datasource=github-releases packageName=moby/moby
RUN install-tool docker v26.1.4
# renovate: datasource=github-releases packageName=containerbase/node-prebuild versioning=node
RUN install-tool node 20.14.0
# enable buildin corepack
RUN corepack enable
# renovate: datasource=github-releases packageName=containerbase/python-prebuild
RUN install-tool python 3.12.4
# prepare some tools for devcontainer
#RUN prepare-tool python
USER $USER_NAME
# disable anoying download promt
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0