-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ubuntu.gcc7
More file actions
56 lines (41 loc) · 1.79 KB
/
Dockerfile.ubuntu.gcc7
File metadata and controls
56 lines (41 loc) · 1.79 KB
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
# FROM gcc:4.9
# LABEL maintainer="amir.aharon@ipgallery.com"
# WORKDIR /project
# RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list \
# && apt-get update && apt-get -t jessie-backports install -y --no-install-recommends \
# gdb cmake \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/jessie-backports.list
FROM ubuntu:xenial
LABEL maintainer="amir.aharon@ipgallery.com"
VOLUME "/project"
WORKDIR "/project"
RUN apt-get update
RUN apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update
# RUN apt-get dist-upgrade -y
RUN apt-get install gcc-7 g++-7 make gdb gdbserver wget -y && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
# wget -O /tmp/conan.deb -L https://github.com/conan-io/conan/releases/download/0.25.1/conan-ubuntu-64_0_25_1.deb && \
# dpkg -i /tmp/conan.deb
RUN cd /opt \
&& wget https://cmake.org/files/v3.10/cmake-3.10.1-Linux-x86_64.tar.gz \
&& tar xf cmake-3.10.1-Linux-x86_64.tar.gz \
&& rm cmake-3.10.1-Linux-x86_64.tar.gz \
&& ln -sf /opt/cmake-3.10.1-Linux-x86_64/bin/cmake /usr/bin/cmake
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 999 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 999 \
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-7 999 \
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-7 999
ADD ./scripts/cmake-build.sh /build.sh
RUN chmod +x /build.sh
RUN useradd -ms /bin/bash develop
RUN echo "develop ALL=(ALL:ALL) ALL" >> /etc/sudoers
EXPOSE 2000
USER develop
VOLUME "/home/develop/project"
WORKDIR "/home/develop/project"
#ENTRYPOINT exec /build.sh