Skip to content

Commit 8c4e9db

Browse files
committed
fix(Dockerfile): configure a container to use Moscow time.
This is needed because our current infrastructure and data use Moscow time. In order to make a transition smooth, we need this. This will be removed once #76 gets resolved. Addressed to #534 [ci skip]
1 parent 7f1515c commit 8c4e9db

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docker/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ EXPOSE 8080
1212
# See also: https://docs.docker.com/engine/reference/builder/#env
1313
ENV SPRING_PROFILES_ACTIVE=test
1414

15-
# Creates base directories and unprivileged user.
16-
# See also: https://docs.docker.com/engine/reference/builder/#run
17-
#
18-
# /data/uploads and /data/preview are being used only in "prod" profile
15+
# - Creates base directories and unprivileged user.
16+
# See also: https://docs.docker.com/engine/reference/builder/#run
17+
# NOTE: /data/uploads and /data/preview are being used only in "prod" profile.
18+
# - Setting up a timezone to Moscow time.
19+
# TODO: remove when #76 will be resolved and application will use UTC timezone.
1920
RUN mkdir /data \
2021
&& useradd mystamps --home-dir /data/mystamps --create-home --comment 'MyStamps' \
2122
&& mkdir /data/uploads /data/preview /data/heap-dumps \
22-
&& chown mystamps:mystamps /data/uploads /data/preview /data/heap-dumps
23+
&& chown mystamps:mystamps /data/uploads /data/preview /data/heap-dumps \
24+
&& ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime \
25+
&& dpkg-reconfigure -f noninteractive tzdata
2326

2427
# Creates mount points and marks them as holding externally mounted volumes from native host.
2528
# See also: https://docs.docker.com/engine/reference/builder/#volume

0 commit comments

Comments
 (0)