1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2025-06-13 12:54:29 +00:00
- Clean up Dockerfile
  - Add comments for user related commands in Dockerfile
  - Correct spelling in UserManual.md
  - Remove an uneeded `-t` flag in the laminarc example
  - UIDs are flexible when using the `--user` option with docker so
    remove ref to UIDs for file ownership
  - Remove additional example and explanation for docker-build.sh script
This commit is contained in:
Devon Bagley 2019-09-15 18:08:59 -07:00
parent ef8c246a15
commit f1a5393477
2 changed files with 6 additions and 17 deletions

View File

@ -47,21 +47,12 @@ See the [development README](https://github.com/ohwgiles/laminar) for instructio
You can build an image that runs `laminard` by default, and contains `laminarc` for use based on `alpine:edge` using the `Dockerfile` in the `docker/` directory. You can build an image that runs `laminard` by default, and contains `laminarc` for use based on `alpine:edge` using the `Dockerfile` in the `docker/` directory.
Keep in mind that this is meant to be used as a base image to build from, so it contains only the minimum packages required to run laminar. The only shell available by default is sh and it does not even have ssh or git. You can use this image to run a basic build server, but it is recomended that you build a custom image from this base to better suit your needs.
```bash ```bash
# from the repository root: # from the repository root:
docker build [-t image:tag] -f docker/Dockerfile . docker build [-t image:tag] -f docker/Dockerfile .
``` ```
You can also build a docker image using a bash script provided in the root of the repository. You should already have docker installed on your machine for this to work. Keep in mind that this is meant to be used as a base image to build from, so it contains only the minimum packages required to run laminar. The only shell available by default is sh and it does not even have ssh or git. You can use this image to run a basic build server, but it is recommended that you build a custom image from this base to better suit your needs.
```bash
# from the repository root:
./docker-build.sh [(OPTIONAL) tag {default:latest}]
```
This will build an image from from the Dockerfile in `docker/` tagged as `laminar:${tag}`.
### laminard ### laminard
@ -71,14 +62,14 @@ The container will execute `laminard` by default. To start a laminar server with
docker run -d --name laminar_server -p 8080:8080 [-v laminardir|laminar.conf] laminar:latest docker run -d --name laminar_server -p 8080:8080 [-v laminardir|laminar.conf] laminar:latest
``` ```
You can customize laminar and persist your data by mounting your laminar directory to `/var/lib/laminar` and/or mounting a custom configuration file to `/etc/laminar.conf`. The uid:gid ownership for the files mounted to `/var/lib/laminar` should be `100:100`. You can customize laminar and persist your data by mounting your laminar directory to `/var/lib/laminar` and/or mounting a custom configuration file to `/etc/laminar.conf`.
### laminarc ### laminarc
You can execute `laminarc` either standalone, by running the image, or by executing `laminarc` on a running instance of the image. You can execute `laminarc` either standalone, by running the image, or by executing `laminarc` on a running instance of the image.
```bash ```bash
docker exec -it laminar_server laminarc queue example_task docker exec -i laminar_server laminarc queue example_task
``` ```
--- ---

View File

@ -34,13 +34,11 @@ RUN apk add --no-cache --virtual .build -X http://dl-3.alpinelinux.org/alpine/ed
apk del .build && \ apk del .build && \
rm -rf /build rm -rf /build
# Create laminar system user in "users" group
RUN adduser -SDh /var/lib/laminar -g 'Laminar' -G users laminar RUN adduser -SDh /var/lib/laminar -g 'Laminar' -G users laminar
# Set the working directory to the laminar user's home
WORKDIR /var/lib/laminar WORKDIR /var/lib/laminar
# Run the preceeding as the user laminar
RUN mkdir .ssh && \
chown -R laminar:users .
USER laminar USER laminar
ENTRYPOINT [ "/sbin/tini", "--" ] ENTRYPOINT [ "/sbin/tini", "--" ]