Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't drop from root, causes error when changing file permission #17

Merged
merged 2 commits into from Oct 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions Dockerfile
Expand Up @@ -3,19 +3,9 @@ FROM node:6
ENV LOUNGE_VERSION 2.0.1
ENV NODE_ENV production

ARG user=lounge
ARG group=lounge
ARG uid=1000
ARG gid=1000

ENV LOUNGE_HOME "/home/lounge/data"

# Create a non-root user for lounge to run in.
RUN groupadd --gid ${gid} ${group} \
&& useradd --create-home --uid ${uid} --gid ${gid} ${user}

RUN mkdir -p "${LOUNGE_HOME}"
RUN chown -R ${user}:${group} "${LOUNGE_HOME}"
VOLUME "${LOUNGE_HOME}"

# Install thelounge.
Expand All @@ -27,7 +17,4 @@ EXPOSE ${PORT}

COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh

# Drop root.
USER ${user}

ENTRYPOINT ["docker-entrypoint.sh"]
5 changes: 0 additions & 5 deletions README.md
Expand Up @@ -31,8 +31,3 @@ You can control how The Lounge is started through the following environment vari
## Where is data stored?

Lounge reads and stores its configuration, logs and other data at `/home/lounge/data`.

## What user does lounge run as?

Lounge runs as the `lounge:lounge` user by default, with `uid=1000, gid=1000`. These can be
overridden with the `user`, `uid`, `group`, `gid` [build args](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg).