Skip to content

Commit c285d4e

Browse files
committed
add gosu and net-tools to base ubuntu image, refactor to not change to box user
1 parent 7e5f511 commit c285d4e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

poetry/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM rootnroll/demo-ubuntu:18.04
22
LABEL maintainer "Pavel Sviderski <[email protected]>"
33

44
ENV POETRY_VERSION 0.12.7
5+
USER box
6+
WORKDIR /home/box
57

68
# Create a virtualenv for poetry to force it to use Python 3
79
RUN python3 -m venv ~/.virtualenvs/poetry \

ubuntu/18.04/Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:18.04
22
LABEL maintainer "Pavel Sviderski <[email protected]>"
33

44
RUN apt-get update && apt-get --no-install-recommends -y install \
5-
sudo man less locales gnupg2 vim nano screen tmux ca-certificates curl wget \
5+
sudo man less locales gnupg2 vim nano screen tmux ca-certificates curl wget net-tools \
66
git rsync \
77
python3 python3-pip python3-venv \
88
# Add fish-shell repo and install fish, gnupg2 is required for apt-key
@@ -15,16 +15,18 @@ RUN locale-gen en_US.UTF-8
1515
ENV LANG en_US.UTF-8
1616
ENV LANGUAGE en_US:en
1717
ENV LC_ALL en_US.UTF-8
18-
ENV SHELL /usr/bin/fish
18+
19+
ENV GOSU_VERSION 1.11
20+
RUN wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" \
21+
&& chmod +x /usr/local/bin/gosu
1922

2023
RUN useradd -m box -s /usr/bin/fish \
2124
&& echo "box ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/box
22-
USER box
23-
WORKDIR /home/box
2425

2526
# Install fisher package manager and configure the Powerline-style bobthefish theme
26-
RUN curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs https://git.io/fisher \
27-
&& fish -c "fisher add oh-my-fish/theme-bobthefish"
28-
COPY --chown=box:box config.fish .config/fish/
27+
RUN gosu box curl -Lo /home/box/.config/fish/functions/fisher.fish --create-dirs https://git.io/fisher \
28+
&& gosu box fish -c "fisher add oh-my-fish/theme-bobthefish"
29+
COPY --chown=box:box config.fish /home/box/.config/fish/
30+
ENV SHELL /usr/bin/fish
2931

3032
CMD ["/usr/bin/fish", "-l"]

0 commit comments

Comments
 (0)