Add setting container timezone for servers

This commit is contained in:
Deon George 2018-03-21 16:36:33 +11:00
parent 244fbfa243
commit 1d5077d825
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
2 changed files with 14 additions and 1 deletions

View File

@ -132,6 +132,19 @@ ENTRYPOINT [ "/sbin/init" ]
CMD [ "start" ] CMD [ "start" ]
``` ```
### Set your container timezone (optional)
If you want your running container to be in your timezone, then add this to your Dockerfile
```Dockerfile
# Set out local time
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
```
<small>**NOTE**: This will set your timezone to Melbourne, Australia - naturally, choose the appropriate Country/City for your timezone.
## Build your Image
A complete Dockerfile is available [here](http://dev.leenooks.net/deon/spdocker/blob/master/Dockerfile) if you need one as a starting point. Once you have your images loaded on a web server, and the supporting build files run `docker build -t ibm/spectrumprotect:8.1.x .` A complete Dockerfile is available [here](http://dev.leenooks.net/deon/spdocker/blob/master/Dockerfile) if you need one as a starting point. Once you have your images loaded on a web server, and the supporting build files run `docker build -t ibm/spectrumprotect:8.1.x .`
If your final build is successful, you should see a Docker Image that is about 3GB. If your final build is successful, you should see a Docker Image that is about 3GB.