mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
feat: replace alpine with debian slim
This commit is contained in:
1 parent
aa95eda23c
commit
08e9191c4b
1 file changed
+14
-5
+14
-5
@@ -1,15 +1,21 @@
|
|||||||
FROM alpine:3.18
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
LABEL maintainer="wancat@wancat.cc"
|
LABEL maintainer="wancat@wancat.cc"
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apt-get update && apt-get install -y \
|
||||||
vim \
|
vim \
|
||||||
zsh \
|
zsh \
|
||||||
nodejs \
|
curl \
|
||||||
yarn
|
openssh-server
|
||||||
|
|
||||||
|
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
|
||||||
|
RUN bash nodesource_setup.sh
|
||||||
|
RUN apt-get install -y nodejs
|
||||||
|
RUN npm install -g yarn
|
||||||
|
RUN node -v && yarn -v
|
||||||
|
|
||||||
WORKDIR /usr/local/lib/container
|
WORKDIR /usr/local/lib/container
|
||||||
|
|
||||||
COPY ./packages/container/package.json ./yarn.lock ./
|
COPY ./packages/container/package.json ./yarn.lock ./
|
||||||
RUN yarn install --modules-folder /usr/src/node_modules
|
RUN yarn install --modules-folder /usr/src/node_modules
|
||||||
ENV NODE_PATH=/usr/src/node_modules
|
ENV NODE_PATH=/usr/src/node_modules
|
||||||
@@ -19,6 +25,9 @@ COPY ./quests/.includes/zshrc /etc/zsh/zshrc
|
|||||||
ENV USERNAME=commander
|
ENV USERNAME=commander
|
||||||
|
|
||||||
RUN adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME}
|
RUN adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME}
|
||||||
|
COPY ./ssh_pubkey /home/${USERNAME}/.ssh/authorized_keys
|
||||||
|
RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys
|
||||||
|
RUN chmod 700 /home/${USERNAME}/.ssh
|
||||||
|
|
||||||
USER ${USERNAME}
|
USER ${USERNAME}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user