Atom packages are not working inside docker


#1

I am trying to install atom with java auto complete inside docker. Atom is installing and working fine, but autocomplte packages are not working. I am mainly looking for autocomplete when i write java code.
Atom Version: 21.2
Packages = “autocomplete-java-minus java-import-wiz java-plus java-classpath-registry busy autocomplete-java”

Docker File

FROM ubuntu:trusty
ENV DEBIAN_FRONTEND noninteractive
ENV ATOM_PACKAGES="autocomplete-java- autocomplete-java-minus java-import-wiz java-plus java-classpath-registry busy"
ADD startup.sh /startup.sh

RUN apt-get update -y

RUN apt-get install -y git x11vnc wget python python-numpy unzip Xvfb firefox openbox geany menu &&
cd /root && git clone xxxxnoVNC.git &&
cd noVNC/utils && git clone xxxwebsockify websockify &&
cd /root &&
chmod 0755 /startup.sh &&
apt-get autoclean &&
apt-get autoremove &&
rm -rf /var/lib/apt/lists/*
RUN add-apt-repository -y ppa:webupd8team/atom &&
apt-get update &&
apt-get install -y atom &&
apm install {ATOM_PACKAGES} && \ apm rebuild {ATOM_PACKAGES}
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN apt-get install -y nodejs make gcc g++ gconf2 xdg-utils
CMD /startup.sh
EXPOSE 6080

Startup.sh

#!/bin/bash
useradd -d /home/user user
export DISPLAY=:1
Xvfb :1 -screen 0 1600x900x16 &
sleep 5
openbox-session&
x11vnc -display :1 -nopw -listen localhost -xkb -ncache 10 -ncache_cr -forever &
cd /root/noVNC && ln -s vnc_auto.html index.html && ./utils/launch.sh --vnc localhost:5900
su user -c “atom /home/user/document.java”


#2

It’s only autocomplete packages? Do they appear to be installing correctly? What about built-in autocomplete packages?


#3

It’s installing properly but not loading when atom starts i guess. Directories names with packages are present in .atom/packages directory of users home directory.

Built in autocomplete packages are not auto completing java code.


#4

How would you tell if a package is loaded? As it turns out, there’s an API method just for that. You can open the developer tools (View -> Developer -> Toggle developer tools), go to Console, and enter atom.packages.getActivePackages(). You can check for specific packages by filtering that list with a command like atom.packages.getActivePackages().filter( package => package.name == "autocomplete-java")[0]. If autocomplete-java is activated, that code will show you the package object.