Skip to content
Brady Trainor edited this page Nov 24, 2018 · 1 revision

Here are some snippets to make a docker image for providing reproducible issues for dart-mode.

The current example assists in reproducing an issue likely due to users installing flutter but not dart, and not setting dart-sdk-path properly.

Wherever you put your Dockerfile, you can place a .emacs.d directory adjacent, and clone into .emacs./lisp the dart-mode, s.el and dash.el repos from Github.

$ tree -aL 3
.
├── .emacs.d
│   ├── init.el
│   └── lisp
│       ├── dart-mode
│       ├── dash.el
│       └── s.el
├── Dockerfile
└── README.md

5 directories, 3 files
(add-to-list 'load-path "/root/.emacs.d/lisp/dart-mode/")
(add-to-list 'load-path "/root/.emacs.d/lisp/dash.el/")
(add-to-list 'load-path "/root/.emacs.d/lisp/s.el/")
(add-to-list 'auto-mode-alist '("\\.dart\\'" . dart-mode))

(setq dart-sdk-path "/flutter/bin/cache/dart-sdk/")
(setq dart-enable-analysis-server t)

(setq dart-debug t)
(toggle-debug-on-error)

(require 'subr-x)
(require 'dart-mode)
FROM ubuntu
RUN apt-get update && apt-get install -y \
        wget curl xz-utils git emacs-nox \
        && rm -rf /var/lib/apt/lists/*
RUN wget https://storage.googleapis.com/flutter_infra/releases/beta/linux/flutter_linux_v0.11.9-beta.tar.xz \
        && tar xf flutter_linux_v0.11.9-beta.tar.xz \
        && rm flutter_linux_v0.11.9-beta.tar.xz
RUN ./flutter/bin/flutter --version
ADD .emacs.d /root/.emacs.d
CMD emacs flutter/examples/platform_channel/lib/
docker build . -t this:one
docker run --rm -it this:one
Clone this wiki locally