Skip to content

Commit 6f0c7b8

Browse files
feat: TZ variable for docker
1 parent dcbaa2a commit 6f0c7b8

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM alpine
22

3+
# Add support for TZ environment variable
4+
RUN apk add --no-cache tzdata
5+
36
VOLUME /data
47

58
WORKDIR /config

README.md

+9-11
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,20 @@ services:
163163
image: ghcr.io/itsnotgoodname/smtpbridge:latest
164164
container_name: smtpbridge
165165
environment:
166-
- SMTPBRIDGE_CONFIG_YAML: | # Config option 1
167-
endpoints:
168-
hello_world:
169-
kind: console
170-
171-
rules:
172-
hello_world:
166+
TZ: Etc/UTC
167+
SMTPBRIDGE_CONFIG_YAML: | # Config option 1
168+
endpoints:
169+
hello_world:
170+
kind: console
171+
172+
rules:
173+
hello_world:
173174
ports:
174175
- 1025:1025
175176
- 8080:8080
176177
volumes:
177178
- /path/to/config:/config # Config option 2
178179
- /path/to/data:/data
179-
- /etc/timezone:/etc/timezone:ro
180-
- /etc/localtime:/etc/localtime:ro
181180
restart: unless-stopped
182181
```
183182

@@ -186,12 +185,11 @@ services:
186185
```sh
187186
docker run -d \
188187
--name=smtpbridge \
188+
-e TZ=Etc/UTC \
189189
-p 1025:1025 \
190190
-p 8080:8080 \
191191
-v /path/to/config:/config \
192192
-v /path/to/data:/data \
193-
-v /etc/timezone:/etc/timezone:ro \
194-
-v /etc/localtime:/etc/localtime:ro \
195193
--restart unless-stopped \
196194
ghcr.io/itsnotgoodname/smtpbridge:latest
197195
```

0 commit comments

Comments
 (0)