-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from theohbrothers/feature/add-docker-variants
Feature: Add `docker` variants
- Loading branch information
Showing
38 changed files
with
1,948 additions
and
82 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@' | ||
#!/bin/sh | ||
set -eu | ||
'@ | ||
|
||
if ($VARIANT['_metadata']['base_tag']) { | ||
# Incremental build | ||
foreach ($c in $VARIANT['_metadata']['components']) { | ||
if ($c -eq 'docker') { | ||
@' | ||
echo "Starting dockerd" | ||
sudo dockerd & | ||
'@ | ||
} | ||
if ($c -eq 'docker-rootless') { | ||
@' | ||
echo "Starting rootless dockerd" | ||
PATH=/home/user/bin:/sbin:/usr/sbin:$PATH dockerd-rootless.sh & | ||
'@ | ||
} | ||
} | ||
} | ||
|
||
@' | ||
echo "Starting code-server" | ||
exec code-server --bind-addr 0.0.0.0:8080 --disable-telemetry --disable-update-check | ||
'@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
set -eu | ||
echo "Starting code-server" | ||
exec code-server --bind-addr 0.0.0.0:8080 --disable-telemetry --disable-update-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ARG BASE_IMAGE | ||
FROM $BASE_IMAGE | ||
|
||
USER root | ||
|
||
# Install docker | ||
RUN apk add --no-cache shadow-uidmap fuse-overlayfs iproute2 iptables ip6tables | ||
RUN apk add --no-cache docker | ||
RUN adduser user docker | ||
|
||
# Install docker compose v2 | ||
RUN apk add --no-cache docker-cli-compose | ||
|
||
# Install docker-compose v1 (deprecated, but for backward compatibility) | ||
RUN apk add --no-cache docker-compose | ||
|
||
|
||
# Remove the default code-server config file created when extensions are installed | ||
USER user | ||
RUN rm -fv ~/.config/code-server/config.yaml | ||
|
||
USER root | ||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
ENV LANG=en_US.UTF-8 | ||
USER user | ||
WORKDIR /home/user | ||
CMD [ "/docker-entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
set -eu | ||
echo "Starting dockerd" | ||
sudo dockerd & | ||
echo "Starting code-server" | ||
exec code-server --bind-addr 0.0.0.0:8080 --disable-telemetry --disable-update-check |
Oops, something went wrong.