Skip to content

Commit

Permalink
Added tzdata to docker image to support timezones #169
Browse files Browse the repository at this point in the history
  • Loading branch information
Forceu committed Jun 4, 2024
1 parent 08a81fa commit 507c7b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM alpine:3.19


RUN addgroup -S gokapi && adduser -S gokapi -G gokapi
RUN apk update && apk add --no-cache su-exec tini ca-certificates curl && mkdir /app && touch /app/.isdocker
RUN apk update && apk add --no-cache su-exec tini ca-certificates curl tzdata && mkdir /app && touch /app/.isdocker

COPY dockerentry.sh /app/run.sh

Expand Down
4 changes: 3 additions & 1 deletion docs/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ Docker

To start the container, run the following command: ::

docker run -v gokapi-data:/app/data -v gokapi-config:/app/config -p 127.0.0.1:53842:53842 f0rc3/gokapi:latest
docker run -v gokapi-data:/app/data -v gokapi-config:/app/config -p 127.0.0.1:53842:53842 -e TZ=UTC f0rc3/gokapi:latest

With the argument ``-p 127.0.0.1:53842:53842`` the service will only be accessible from the machine it is running on. In most use-cases you will use a reverse proxy for SSL - if you want to make the service available to other computers in the network without a reverse proxy, replace the argument with ``-p 53842:53842``. Please note, unless you select SSL during the setup, the traffic will not be encrypted that way and data like passwords or transferred files can easily be read by third parties!

Set ``-e TZ=UTC`` to the timezone you are in, e.g. ``-e TZ=Europe/Berlin``.

If you do not want the binary to run as the root user in the container, you can set the environment variable ``DOCKER_NONROOT`` to true.


Expand Down

0 comments on commit 507c7b5

Please sign in to comment.