Docker file for V3
Pascal76 opened this issue · 14 comments
Hello,
Is it possible to provide a docker file for the new release please ? :)
Thanks for the question @Pascal76!
We are planning to create setup guides for different tools/environments, including Docker, soon (after all the bug issues on GitHub are solved). Thus, I'm leaving this issue as open.
In the meantime, I will try to guide you towards a file that works for you, here's a basic setup:
# choose your version of node
FROM node:latest
# set all the Export Server related environment variables
ENV ACCEPT_HIGHCHARTS_LICENSE=1
ENV HIGHCHARTS_VERSION=11.2.0
# get the export server
RUN npm install highcharts-export-server@3.0.3 -g
EXPOSE 8080
# ... continue as below
Let me know if that works for you or if you need anything else.
Thanks @jakubSzuminski
I got this error:
`sh build.sh
[+] Building 3.1s (9/11) docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 684B 0.0s
=> [internal] load metadata for docker.io/library/node:latest 0.6s
=> [internal] load build context 0.0s
=> => transferring context: 11.21kB 0.0s
=> [1/7] FROM docker.io/library/node:latest@sha256:84bb4077fd52933a935e7057ba9991e7cb18487b0ba444835dd44975aa94b7b2 0.0s
=> CACHED [2/7] ADD [fonts,/usr/share/fonts] 0.0s
=> [3/7] RUN apt-get -y update 1.1s
=> [4/7] RUN apt-get -y install git 0.5s
=> ERROR [5/7] RUN git clone https://github.com/highcharts/node-export-server/#stable 0.9s
[5/7] RUN git clone https://github.com/highcharts/node-export-server/#stable:
0.143 Cloning into '#stable'...
0.856 fatal: https://github.com/highcharts/node-export-server/#stable/info/refs not valid: is this a git repository?
Dockerfile:21
19 | RUN apt-get -y install git
20 |
21 | >>> RUN git clone https://github.com/highcharts/node-export-server/#stable
22 | RUN cd node-export-server && npm install
23 |
ERROR: failed to solve: process "/bin/sh -c git clone https://github.com/highcharts/node-export-server/#stable" did not complete successfully: exit code: 128
`
Here's a working dockerfile:
Dockerfile.zip
(it's in a zip because GitHub doesn't like docker for some reason)
Great, thanks! This will be very helpful for us and other users.