chore: add memcached + docker-cli to dev container (#3691)

This commit is contained in:
Nicolas Giard 2022-03-19 13:05:59 -04:00 committed by GitHub
parent 74d30529b6
commit 562742d653
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

View file

@ -10,6 +10,13 @@
"containerEnv": { "containerEnv": {
"EDITOR_VSCODE": "true" "EDITOR_VSCODE": "true"
}, },
"features": {
"docker-in-docker": {
"version": "latest"
},
"github-cli": "latest"
},
// Set *default* container specific settings.json values on container create. // Set *default* container specific settings.json values on container create.
"settings": { "settings": {

View file

@ -13,6 +13,11 @@ EXPOSE 8000
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# Add Docker Source
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update RUN apt-get update
# apt-get upgrade is normally not a good idea, but this is a dev container # apt-get upgrade is normally not a good idea, but this is a dev container
@ -26,6 +31,7 @@ RUN apt-get install -qy \
bash \ bash \
build-essential \ build-essential \
curl \ curl \
docker-ce-cli \
enscript \ enscript \
fish \ fish \
gawk \ gawk \
@ -48,9 +54,11 @@ RUN apt-get install -qy \
libxtst6 \ libxtst6 \
libmagic-dev \ libmagic-dev \
libmariadb-dev \ libmariadb-dev \
libmemcached-tools \
libtidy-dev \ libtidy-dev \
locales \ locales \
mariadb-client \ mariadb-client \
memcached \
netcat \ netcat \
nano \ nano \
pigz \ pigz \

View file

@ -84,11 +84,16 @@ for sub in \
done done
# Wait for DB container # Wait for DB container
if [ -n "$EDITOR_VSCODE" ]; then if [ -n "$EDITOR_VSCODE" ]; then
echo "Waiting for DB container to come online ..." echo "Waiting for DB container to come online ..."
/usr/local/bin/wait-for localhost:3306 -- echo "DB ready" /usr/local/bin/wait-for localhost:3306 -- echo "DB ready"
fi fi
# Run memcached
/usr/bin/memcached -u root -d
# Initial checks # Initial checks
echo "Running initial checks..." echo "Running initial checks..."