-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
100 lines (76 loc) · 3.82 KB
/
Dockerfile
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/bin/sh
# Copyright (c) 2018-2020 Orson Teodoro
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
FROM gentoo/portage:latest as portage
# Pick whatever is closest to native
# See https://github.com/gentoo/gentoo-docker-images/
FROM gentoo/portage:latest as portage
FROM gentoo/stage3:latest
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
MAINTAINER Orson Teodoro <[email protected]>
ADD make.conf /etc/portage/make.conf
RUN emerge dev-vcs/git
ADD add-mask.sh /usr/bin/add-mask.sh
RUN chmod +x /usr/bin/add-mask.sh
RUN /usr/bin/add-mask.sh
ADD add-use-flags.sh /usr/bin/add-use-flags.sh
RUN chmod +x /usr/bin/add-use-flags.sh
RUN /usr/bin/add-use-flags.sh
#RUN mkdir -p /etc/portage/repos.conf
RUN emerge app-eselect/eselect-repository
# Invalidate cache for new commits
RUN mkdir -p /var/cache/docker-gentoo-nano-ycmd
ADD https://api.github.com/repos/orsonteodoro/oiledmachine-overlay/git/refs/heads/master /var/cache/docker-gentoo-nano-ycmd/oiledmachine-overlay-master-latest-commit.json
RUN eselect repository add "oiledmachine-overlay" "git" "https://github.com/orsonteodoro/oiledmachine-overlay.git"
RUN emaint sync -r oiledmachine-overlay
ADD add-accept_keywords.sh /usr/local/bin/add-accept_keywords.sh
RUN chmod +x /usr/local/bin/add-accept_keywords.sh
RUN /usr/local/bin/add-accept_keywords.sh
ADD add-use-dotnet.sh /usr/local/bin/add-use-dotnet.sh
RUN chmod +x /usr/local/bin/add-use-dotnet.sh
RUN /usr/local/bin/add-use-dotnet.sh
ADD add-global-use-flags.sh /usr/local/bin/add-global-use-flags.sh
RUN chmod +x /usr/local/bin/add-global-use-flags.sh
RUN /usr/local/bin/add-global-use-flags.sh
ADD add-global-mask.sh /usr/local/bin/add-global-mask.sh
RUN chmod +x /usr/local/bin/add-global-mask.sh
RUN /usr/local/bin/add-global-mask.sh
ADD add-unmask.sh /usr/local/bin/add-unmask.sh
RUN chmod +x /usr/local/bin/add-unmask.sh
RUN /usr/local/bin/add-unmask.sh
ADD add-licenses.sh /usr/local/bin/add-licenses.sh
RUN chmod +x /usr/local/bin/add-licenses.sh
RUN /usr/local/bin/add-licenses.sh
ADD add-envars.sh /usr/local/bin/add-envars.sh
RUN chmod +x /usr/local/bin/add-envars.sh
RUN /usr/local/bin/add-envars.sh
ADD edit-make_conf.sh /usr/local/bin/edit-make_conf.sh
RUN chmod +x /usr/local/bin/edit-make_conf.sh
RUN /usr/local/bin/edit-make_conf.sh
# Invalidate cache for new commits
ADD https://api.github.com/repos/orsonteodoro/nano-ycmd/git/refs/heads/ymcd-code-completion /var/cache/docker-gentoo-nano-ycmd/nano-ycmd-ymcd-code-completion-latest-commit.json
RUN emerge nano-ycmd --autounmask --autounmask-write
RUN yes | etc-update --automode -3
RUN ls /usr/lib/python*/site-packages/ycmd/47/ycmd
RUN which ynano
ADD start-nano-ycmd.sh /usr/local/bin/start-nano-ycmd.sh
RUN chmod +x /usr/local/bin/start-nano-ycmd.sh
ENTRYPOINT ["/usr/local/bin/start-nano-ycmd.sh"]
# To go to console shell for debugging, you should edit start-nano-ycmd.sh instead.