forked from noseka1/toolbox-container
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (32 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
47 lines (32 loc) · 1.15 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
#########################
# STAGE GOLANG-BUILDER #
#########################
FROM docker.io/fedora:34 as golang-builder
COPY toolbox_install_common.sh /usr/local/bin
COPY toolbox_install_golang.sh /usr/local/bin
RUN /usr/local/bin/toolbox_install_golang.sh
#########################
# STAGE BASIC #
#########################
FROM docker.io/fedora:34 as basic
ARG OPENSHIFT_TOOLBOX_COMMIT=unspecified
ENV OPENSHIFT_TOOLBOX_COMMIT $OPENSHIFT_TOOLBOX_COMMIT
COPY toolbox_install_common.sh /usr/local/bin
COPY toolbox_install_basic.sh /usr/local/bin
RUN /usr/local/bin/toolbox_install_basic.sh
COPY --from=golang-builder /root/go/bin/dlv /usr/local/bin
# add start script
COPY toolbox_start.sh /usr/local/bin
RUN adduser toolbox --groups wheel && \
chgrp 0 /home/toolbox && \
chmod 775 /home/toolbox
# allow sudo without password
RUN echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/10_wheel_nopasswd
WORKDIR /home/toolbox
CMD [ "/usr/local/bin/toolbox_start.sh" ]
#########################
# STAGE FULL #
#########################
FROM basic as full
COPY toolbox_install_full.sh /usr/local/bin
RUN /usr/local/bin/toolbox_install_full.sh