mirror of
https://github.com/mentos1386/dotfiles.git
synced 2024-11-26 17:18:01 +00:00
fix(workspace): change use of chsh
This commit is contained in:
parent
cb1cbff8da
commit
5a1fa48898
2 changed files with 6 additions and 11 deletions
16
Dockerfile
16
Dockerfile
|
@ -17,7 +17,7 @@ RUN apk --update --no-cache add \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
tmux \
|
tmux \
|
||||||
zsh \
|
zsh \
|
||||||
&& adduser -D "${SSH_USER}" -s /bin/bash \
|
&& adduser -D "${SSH_USER}" -s /bin/zsh \
|
||||||
&& ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa \
|
&& ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa \
|
||||||
&& ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa \
|
&& ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa \
|
||||||
&& ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa \
|
&& ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa \
|
||||||
|
@ -31,11 +31,10 @@ RUN apk --update --no-cache add \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
|
||||||
# Configure SSH
|
# Configure SSH
|
||||||
RUN touch /etc/ssh/sshd_config.d/custom \
|
RUN echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config \
|
||||||
&& echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config.d/custom \
|
&& echo "PasswordAuthentication no" >> /etc/ssh/sshd_config \
|
||||||
&& echo "PasswordAuthentication no" >> /etc/ssh/sshd_config.d/custom \
|
&& echo "UsePAM no" >> /etc/ssh/sshd_config \
|
||||||
&& echo "UsePAM no" >> /etc/ssh/sshd_config.d/custom \
|
&& echo "X11Forwarding no" >> /etc/ssh/sshd_config
|
||||||
&& echo "X11Forwarding no" >> /etc/ssh/sshd_config.d/custom
|
|
||||||
|
|
||||||
# install tools
|
# install tools
|
||||||
COPY --from=ghcr.io/mentos1386/starship:0.47.0 /usr/local/bin/starship /usr/local/bin/starship
|
COPY --from=ghcr.io/mentos1386/starship:0.47.0 /usr/local/bin/starship /usr/local/bin/starship
|
||||||
|
@ -54,15 +53,12 @@ ENV CARGO_HOME=/home/${SSH_USER}/.cargo
|
||||||
ENV RUSTUP_HOME=/home/${SSH_USER}/.rustup
|
ENV RUSTUP_HOME=/home/${SSH_USER}/.rustup
|
||||||
ENV PATH=/home/${SSH_USER}/.cargo/bin:$PATH
|
ENV PATH=/home/${SSH_USER}/.cargo/bin:$PATH
|
||||||
# Node
|
# Node
|
||||||
COPY --from=node:15.5.0 --chown=${SSH_USER} /usr/local/bin/node /usr/local/bin/node
|
COPY --from=node:15.5.0 /usr/local/bin/node /usr/local/bin/node
|
||||||
# TODO: Add yarbn/npm/npx/yarnpkg??
|
# TODO: Add yarbn/npm/npx/yarnpkg??
|
||||||
|
|
||||||
# Create .dotfiles
|
# Create .dotfiles
|
||||||
COPY --chown=${SSH_USER}:${SSH_USER} dotfiles /home/${SSH_USER}/.dotfiles
|
COPY --chown=${SSH_USER}:${SSH_USER} dotfiles /home/${SSH_USER}/.dotfiles
|
||||||
|
|
||||||
# Set ZSH for SSH_USER
|
|
||||||
RUN chsh -s $(which zsh) ${SSH_USER}
|
|
||||||
|
|
||||||
# User Configuration
|
# User Configuration
|
||||||
USER "${SSH_USER}"
|
USER "${SSH_USER}"
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ RUN git clone https://github.com/starship/starship.git \
|
||||||
--branch v$VERSION \
|
--branch v$VERSION \
|
||||||
--depth 1 .
|
--depth 1 .
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
RUN strip target/release/starship
|
|
||||||
|
|
||||||
FROM alpine:3
|
FROM alpine:3
|
||||||
LABEL maintainer="Tine <mentos1386> Jozelj <tine@tjo.space>"
|
LABEL maintainer="Tine <mentos1386> Jozelj <tine@tjo.space>"
|
||||||
|
|
Loading…
Reference in a new issue