forked from swift-nav/libsbp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-build
80 lines (71 loc) · 2.16 KB
/
Dockerfile-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Copyright (C) 2020 Swift Navigation Inc.
# Contact: https://support.swiftnav.com
#
# This source is subject to the license found in the file 'LICENSE' which must
# be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
# This describes an image that should be able to generate libsbp bindings.
# See the README.md for instructions on how to use it.
FROM ubuntu:bionic
ARG DEBIAN_FRONTEND=noninteractive
ENV RUSTUP_HOME=/rust
ENV CARGO_HOME=/cargo
ENV PATH=/usr/lib/ccache:/cargo/bin:/rust/bin:${PATH}
RUN \
apt-get update \
&& apt-get install -y \
git \
sudo \
software-properties-common \
apt-utils \
wget \
curl \
build-essential \
pandoc \
llvm \
nodejs \
npm \
mocha \
gradle \
texlive-science \
texlive-fonts-extra \
check \
cmake \
ccache \
pkg-config \
doxygen \
graphviz \
texlive-latex-base \
imagemagick \
libudev-dev \
uuid-dev \
libgmp-dev \
zlib1g-dev \
&& npm install npm@latest -g
RUN add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y \
python-pip \
python3-pip \
python3.5-dev \
python3.6-dev \
python3.7-dev \
python3.8-dev \
&& pip3 install tox \
&& pip install sphinx \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --no-modify-path \
&& curl -sSL https://get.haskellstack.org/ | sh \
&& rm -rf /var/lib/apt/lists/*
# Add a "dockerdev" user with sudo capabilities
# 1000 is the first user ID issued on Ubuntu; might
# be different for Mac users. Might need to add more.
RUN useradd -u 1000 -ms /bin/bash -G sudo dockerdev \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers \
&& find $RUSTUP_HOME -exec chmod a+rw {} \; \
&& find $CARGO_HOME -exec chmod a+rw {} \;
WORKDIR /mnt/workspace
USER dockerdev
RUN stack install --resolver lts-10.10 sbp