File tree Expand file tree Collapse file tree 4 files changed +40
-26
lines changed Expand file tree Collapse file tree 4 files changed +40
-26
lines changed Original file line number Diff line number Diff line change 11VERSION --use-cache-command 0.6
22IMPORT github.com/brad-jones/earthly-devcontainer/debian
3+ IMPORT github.com/brad-jones/earthly-devcontainer/debian/entrypoint
34IMPORT github.com/brad-jones/earthly-devcontainer/debian/ca-certificates
5+
46FROM debian+base
7+ DO debian+INSTALL_HOOKS
58DO ca-certificates+INSTALL
6- # DO ../utils+INSTALL_HOOKS
7- # DO ../utils+INSTALL_ENTRYPOINT
8- # SAVE IMAGE ghcr.io/brad-jones/earthly-devcontainer/devcontainer:latest
9+ DO entrypoint+INSTALL
10+ SAVE IMAGE ghcr.io/brad-jones/earthly-devcontainer/devcontainer:latest
911
1012# https://github.com/brad-jones/hashdir/blob/master/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change @@ -60,26 +60,3 @@ INSTALL_HOOKS:
6060 COPY ./hooks/. /usr/local/bin/.
6161 RUN for file in /usr/local/bin/*.bash; do mv "$file" "${file%%.bash}" ; done
6262 RUN chmod +x /usr/local/bin/*
63-
64- # Create our entrypoint that will execute each time the devcontainer is started.
65- #
66- # This is designed to work with: "overrideCommand": false
67- # If this property in the devcontainer.json config is set to true (the default)
68- # then the entrypoint will not be executed.
69- #
70- # NOTE: The entrypoint will execute with root permissions so it can do things
71- # like setup permissions to the mounted docker socket & then it will use gosu
72- # to switch to the unprivilaged user.
73- #
74- # see: https://code.visualstudio.com/docs/remote/containers-advanced#_adding-startup-commands-to-the-docker-image-instead
75- # INSTALL_ENTRYPOINT:
76- # COMMAND
77- # ARG USERNAME="code"
78- # ARG USER_UID="1000"
79- # ARG USER_GID="${USER_UID}"
80- # ARG DOCKER_SOURCE_SOCKET="/var/run/docker-host.sock"
81- # ARG DOCKER_TARGET_SOCKET="/var/run/docker.sock"
82- # ARG ENTRYPOINT_LOGS="/tmp/entrypoint-logs"
83- # RUN install-entrypoint
84- # ENTRYPOINT [ "/entrypoint.bash" ]
85- # CMD [ "sleep", "infinity" ]
Original file line number Diff line number Diff line change 1+ VERSION --use-cache-command 0.6
2+ IMPORT github.com/brad-jones/earthly-devcontainer/debian
3+ IMPORT github.com/brad-jones/earthly-devcontainer/debian/entrypoint
4+
5+ # Create our entrypoint that will execute each time the devcontainer is started.
6+ #
7+ # This is designed to work with: "overrideCommand": false
8+ # If this property in the devcontainer.json config is set to true (the default)
9+ # then the entrypoint will not be executed.
10+ #
11+ # NOTE: The entrypoint will execute with root permissions so it can do things
12+ # like setup permissions to the mounted docker socket & then it will use gosu
13+ # to switch to the unprivilaged user.
14+ #
15+ # see: https://code.visualstudio.com/docs/remote/containers-advanced#_adding-startup-commands-to-the-docker-image-instead
16+
17+ build :
18+ FROM debian+builder
19+ ARG USERNAME= "code"
20+ ARG USER_UID= "1000"
21+ ARG USER_GID= "${USER_UID}"
22+ ARG DOCKER_SOURCE_SOCKET= "/var/run/docker-host.sock"
23+ ARG DOCKER_TARGET_SOCKET= "/var/run/docker.sock"
24+ ARG ENTRYPOINT_LOGS= "/tmp/entrypoint-logs"
25+ COPY ./install-entrypoint.bash /usr/local/bin/install-entrypoint
26+ RUN chmod +x /usr/local/bin/install-entrypoint && install-entrypoint
27+ SAVE ARTIFACT /entrypoint.bash
28+
29+ INSTALL :
30+ COMMAND
31+ IF [ ! -f "/entrypoint.bash" ]
32+ COPY entrypoint+build/ /
33+ ENTRYPOINT [ "/entrypoint.bash" ]
34+ CMD [ "sleep" , "infinity" ]
35+ END
File renamed without changes.
You can’t perform that action at this time.
0 commit comments