Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Docker container for the launcher #172

Open
rovitotv opened this issue Nov 10, 2019 · 0 comments
Open

Create a Docker container for the launcher #172

rovitotv opened this issue Nov 10, 2019 · 0 comments

Comments

@rovitotv
Copy link

I am trying to create a docker container with the launcher software in it so it could run on Linux, Mac, and Windows. Currently I am having difficulty getting the software to build correctly. It appears that the command 'yarn get all' fails with a non-zero exit code and I can't seem to figure out why. I also think maybe MongoDB needs to be listed as a dependency in the README? I support two FLL tournaments and for now I can use the Windows installer but I would much rather have a Linux version. Thanks for the assistance!

# Dockerfile for FLL scoring software
FROM ubuntu:18.04

MAINTAINER rovitotv@gmail.com

RUN apt-get -y update
RUN apt-get install -y curl wget git libgtk2.0-0 libgtkextra-dev libgconf2-dev libnss3 libasound2 libxtst-dev libxss1 vim
RUN apt-get install -y build-essential
RUN apt-get install -y x11-apps
RUN apt-get install -y libgtk-3-0
RUN apt-get install -y libx11-xcb1

# nodejs
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get -y update
RUN apt install -y nodejs

# yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get -y update
RUN apt-get install -y yarn

# download the FLL launcher
WORKDIR /usr/local
RUN git clone https://github.com/FirstLegoLeague/launcher.git
RUN yarn --version

# build the FLL launcher
WORKDIR /usr/local/launcher
RUN yarn install
RUN yarn get all # this command creates a non-zero exit code

# install MongoDB
WORKDIR /tmp
RUN mkdir /usr/local/launcher/internals
RUN mkdir /usr/local/launcher/internals/mongo
RUN curl https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.1.tgz -o /tmp/mongodb-linux-x86_64-ubuntu1804-4.2.1.tgz && \
    tar -zxvf mongodb-linux-*-4.2.1.tgz && \
    cd mongodb-linux-x86_64-ubuntu1804-4.2.1/ && \
    cp -av bin /usr/local/launcher/internals/mongo/


# run the launcher
WORKDIR /usr/local/launcher
#node ./node_modules/.bin/electron app/main.js
CMD ["yarn", "start"]

expose 8080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant