Skip to content

Commit

Permalink
Added tzdata to allow time zone to be set properly. (#93)
Browse files Browse the repository at this point in the history
* Update Dockerfile

Added entries to install TZ data package

* Added value for timezone

Added entry to set timezone to proper value

* Correct typo

Corrected type in sample TZ entry.
  • Loading branch information
jwilson2899 authored Jan 26, 2025
1 parent 7c73ba9 commit 92d9d1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ ENV DATA_DIR=/data/
# GCC, python3-dev, and musl-dev are required for pillow, and jpeg-dev and zlib-dev are required for jpeg support.
RUN apk add --no-cache curl ffmpeg jq python3 python3-dev gcc musl-dev py3-pip py3-virtualenv jpeg-dev libjpeg-turbo-dev zlib-dev py3-pillow libffi-dev

# Timezone setup steps
# These steps are necessary to add timezone support to the container and allow for setting the timezone
# This allows the log files to show the correct local time
RUN apk add --no-cache tzdata
ENV TZ=Etc/GMT
RUN cp /usr/share/zoneinfo/Etc/GMT /etc/localtime

#
# We decided to not run the installer, since the point of the installer is to setup the env, build the launch args, and setup the service.
# Instead, we will manually run the smaller subset of commands that are required to get the env setup in docker.
Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ services:
- SERIAL_NUMBER=XXXXXXXXXXXXXXX
# Find using the printer's display or use https://octoeverywhere.com/s/bambu-ip
- PRINTER_IP=XXX.XXX.XXX.XXX
# Set timezone to proper timezone for logs using standard timezones:
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
- TZ=America/New_York

# Optionally: If you want to connect via the Bambu Cloud, you can specify the following environment variables.
# By default the plugin will use the local connection mode, which is preferred.
Expand Down Expand Up @@ -47,4 +50,4 @@ services:
#
# volumes:
# # Specify a path mapping for the required persistent storage
# - ./data:/data
# - ./data:/data

0 comments on commit 92d9d1f

Please sign in to comment.