feat: add devcontainer support

This should make it possible to run tests locally in a lighter way than pulling up a full VM.
This commit is contained in:
Jose Diaz-Gonzalez
2021-09-11 21:06:06 -04:00
parent c18722af2b
commit a03a6d996a
2 changed files with 28 additions and 0 deletions

20
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM dokku/dokku:latest
RUN apt-get update
RUN apt-get install --no-install-recommends -y build-essential && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /mnt/dokku/home/dokku /mnt/dokku/var/lib/dokku/config /mnt/dokku/var/lib/dokku/data /mnt/dokku/var/lib/dokku/services && \
chown -R dokku:dokku /mnt/dokku/home/dokku /mnt/dokku/var/lib/dokku/config /mnt/dokku/var/lib/dokku/data /mnt/dokku/var/lib/dokku/services && \
echo "dokku.me" > /home/dokku/VHOST
COPY . .
RUN source /tmp/config && \
echo "export ${PLUGIN_DISABLE_PULL_VARIABLE}=true" > /tmp/.env && \
echo "export PLUGIN_NAME=${PLUGIN_COMMAND_PREFIX}" >> /tmp/.env
RUN source /tmp/.env && \
dokku plugin:install file:///tmp --name $PLUGIN_NAME && \
make ci-dependencies

View File

@@ -0,0 +1,8 @@
{
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"runArgs": ["--init"],
"mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ]
}