Dockerfile
linkslatest
(Dockerfile) alpine
(Dockerfile) 2
, 2.7
, 2.7.4
(and similar versionned tags) are like latest
but for a specific version of Codiad.Codiad is a web-based IDE framework with a small footprint and minimal requirements.
You can add many plugins from the Web UI by opening the right side bar and clicking Marketplace.
latest
is based on Ubuntu, contains docker
and docker-compose
binaries, and is easy to extend so as to include required development tools.alpine
is base on Linux Alpine (very small) with S6 supervisor (lightweight) but some features may not work and it does not support custom CODIAD_UID
/CODIAD_GID
.nginx
and PHP-FPM run as UID 2743
by default once started).docker run --rm -p 8080:80 \
-e CODIAD_UID=$UID -e CODIAD_GID=$GID \
-v $PWD/code:/code \
-v /etc/localtime:/etc/localtime:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
wernight/codiad
Then open your browser at http://localhost:8080
.
Parameters:
-p 80
‒ the port to expose.-e CODIAD_UID
and -e CODIAD_GID
‒ (optional) sets the user / group ID to use for PHP
(i.e. it'll be the user / group under which all Codiad users will execute commands if they use the Terminal plugin or such).-v /code
‒ (optional) persists your configuration and installed plugins (you may also use a Docker volume).-v /etc/localtime
‒ (optional) used for timesync.-v /var/run/docker.sock
‒ (optional) allows to build and run Docker images from within Codiad
(e.g. using the Terminal plugin or Macros plugin). It also gives often nearly root
access to your Codiad
users so use it with care. If you see client API incompatible, you may try to mount also -v /usr/bin/docker:/usr/bin/docker:ro
.
Just ensure that user CODIAD_UID:CODIAD_GID
has read access to that socket file.TL;DR - The CODIAD_UID
and CODIAD_UID
values set the user / group you'd like your container to 'run as'. This can be a user you've created or even root (not recommended).
Part of what makes our containers work so well is by allowing you to specify your own PUID and PGID. This avoids nasty permissions errors with relation to data volumes (-v flags). When an application is installed on the host OS it is normally added to the common group called users, Docker apps due to the nature of the technology can't be added to this group. So we added this feature to let you easily choose when running your containers.
/code/
, for data persistence (or mount another volume).Install common plug-ins via the web interface, like:
/code/plugins/Codiad-Terminal-master/emulator/term.php
to change terminal password (default is terminal
)./code/plugins/Codiad-CodeGit-master/shell.sh
to add Git user/pass.To set up SSH key (see also Codiad Wiki) you can run using Codiad Terminal:
ssh-keygen -f ~/.ssh/id_rsa
ssh-keyscan -t rsa,dsa $DOMAIN_NAME >> ~/.ssh/known_hosts
cat ~/.ssh/id_rsa.pub
You can easily extend to include tool you may need and have them ready
whenever you re-create your container. Just create a Dockerfile
like:
FROM wernight/codiad
RUN apt update && apt install -y build-essential python
Now you can just build and use your new image:
$ docker build -t codiad .
$ docker run --rm -p 8080:80 codiad
docker
and docker-compose
to allow building stuff from within Codiad.latest
based on Ubuntu due to some bugs and to allow extending; keep alpine
as a branch.Suggestions are welcome on our GitHub issue tracker.