Commit graph

25 commits

Author SHA1 Message Date
Stefan Müller
ed6fa9400a Add healthcheck to Dockerfile 2021-07-23 20:14:42 -04:00
Richard Hansen
2e2cb38225 Docker: Install git and ca-certificates packages
This makes it possible to install plugins from Git repositories.
2021-06-18 17:50:44 -04:00
Richard Hansen
2a367f6171 Docker: Pass --no-install-recommends to apt-get intall 2021-06-18 17:50:44 -04:00
Richard Hansen
d4e201b1b0 Docker: Set DEBIAN_FRONTEND=noninteractive when running apt-get 2021-06-18 17:50:44 -04:00
Richard Hansen
e108161f60 Docker: Use apt-get instead of apt
This silences the following warning:

> WARNING: apt does not have a stable CLI interface. Use with caution
> in scripts.
2021-06-18 17:50:44 -04:00
Richard Hansen
b9e495e228 Docker: Combine abiword and libreoffice install steps
This avoids multiple `apt update` runs if both are to be installed,
and it will make it easier to add more packages in the future.
2021-06-18 17:50:44 -04:00
Richard Hansen
e9785f37ee Docker: Install plugins before core deps 2021-06-18 17:50:44 -04:00
Richard Hansen
5946244bef Docker: Nuke all of ~/.npm after installing packages 2021-06-18 17:50:44 -04:00
Richard Hansen
aeb56dd594 Docker: Don't create package-lock.json when installing plugins 2021-06-18 17:50:44 -04:00
Richard Hansen
eccec0ba0a Docker: Invoke npm only once when installing plugins
This speeds up the build process.
2021-03-04 19:07:03 +00:00
Richard Hansen
c07bfe10bd Docker: Add arg for the Etherpad directory
This makes it possible for users to match the directory inside the
container to the host system (for convenience or to avoid confusion).
2021-03-04 19:07:03 +00:00
Richard Hansen
34d9069874 Docker: Add args for the etherpad user's home, UID, GID, and shell
Now one can create an `etherpad` user and group on the host system and
set the container's UID and GID to match:

    adduser --system --group etherpad &&
    uid=$(id -u etherpad) &&
    gid=$(id -g etherpad) &&
    docker build --build-arg EP_UID="${uid}" --build-arg EP_GID="${gid}" .

This ensures that files created by user `etherpad` inside the
container are owned by user `etherpad` outside the container.
2021-03-04 19:07:03 +00:00
Stefan
de186fbe36
Update node in docker to version 14 (#4844) 2021-02-22 01:34:34 -05:00
Ole Langbehn
24c1639f11
feat(docker): Add build var for optionally installing abiword (#4796)
This MR introduces a docker build variable `INSTALL_ABIWORD`. When set
to any value other than `0`, ABIWORD is installed in the resulting
docker container, enabling the possibility to configure ABIWORD in
settings.json.docker or via ENV VAR `ABIWORD` for exporting to
DOC/PDF/ODT.

Documentation is included inline and in the docker markdown file.
2021-02-18 04:27:52 -05:00
Richard Hansen
bdd32f8915 Replace node_modules/ep_etherpad-lite with src 2021-02-16 10:35:05 +00:00
Richard Hansen
8b28e00784 restructure: Prefix bin/ and tests/ with src/
This is a follow-up to commit
2ea8ea1275.
2021-02-05 21:52:08 +00:00
jeanfabrice
52f8fc9ba3
legacySupport: Run node 10 with '--experimental_worker' flags (#4392)
* Run node 10 with '--experimental_worker' flags
* Use dedicated function to retrieve node/npm program version

The goal of this commit is to ensure that any linux based node 10 deployments run with the experimental_worker flag.  This flag is required for workers to "work" in node 10.  This will not affect other versions of node.  This resolves #4335 where Docker would fail due to being based on node 10.
2020-10-06 13:28:11 +01:00
John McLear
0158a4fa02 Revert "docker: use full node(not slim) so we have terser support"
This reverts commit fb163093e3.
2020-06-07 20:36:52 +00:00
John McLear
fb163093e3 docker: use full node(not slim) so we have terser support 2020-06-07 20:31:41 +00:00
Richard Hansen
a4713a8308
Docker: Abort image build when npm install fails (#4026)
Without this change, plugin install failures are silently ignored.
2020-06-01 20:16:08 +01:00
muxator
5ade38c86b docker: build & run the container in production mode
This is leaner (no development dependencies are included in the container) and
faster (among other things, assets are minified & compressed).
2020-04-19 04:41:29 +02:00
Paul Tiedtke
ffc718e8c0 docker: add support for arbitrary user ids (for OpenShift compatibility)
This solves a compatibility problem with OpenShift. In OpenShift security
model, the containers are run by arbitrary user ids, but the users are always
a member of the root group.

This PR adjusts the permissions accordingly.

Documentation reference:
https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#use-uid
2020-04-08 15:06:08 +02:00
Pierre Prinetti
50142f6580 docker: Set the home directory for the user
Before this change, the docker user had home in a directory it had no
permissions on. The inability of creating a cache directory in `$HOME`
prevented npm to work properly.

Additionally, the `node_modules` in the base working directory had its
owner set to root, preventing further changes.

With this change, the `etherpad` user has a home directory.
Additionally, `npm i` is now run by `etherpad` rather than the root
user; this way, it is possible to dynamically change the `node_modules`
content in day 2 operations.

Note that while switching to the `useradd` builtin, a conflict was
discovered with the GID 65534 that was previously used. This change is
changing the `etherpad` user's UID to 5001 to avoid said conflict. As a
consequence, a `chmod -R 5001:5001` must be run prior to attaching
volumes created from previous Etherpad versions.
2019-12-02 22:14:11 +01:00
muxator
30fd53f1fd docker: move docker/settings.json to /settings.json.docker 2019-11-08 23:50:50 +01:00
Pierre Prinetti
dc15f4a43c docker: build from the local working directory
With this change, the Dockerfile builds the Docker image from the code
checked out in the local filesystem, instead of downloading a revision
from git.

Implements #3657
2019-11-08 22:56:30 +01:00
Renamed from docker/Dockerfile (Browse further)