forked from mathew-fleisch/bashbot-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.alpine
More file actions
29 lines (27 loc) · 1.14 KB
/
Dockerfile.alpine
File metadata and controls
29 lines (27 loc) · 1.14 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
FROM alpine:latest
LABEL maintainer="Mathew Fleisch <mathew.fleisch@gmail.com>"
ENV BASHBOT_CONFIG_FILEPATH=/bashbot/config.json
ENV BASHBOT_ENV_VARS_FILEPATH ""
ENV SLACK_TOKEN ""
ENV LOG_LEVEL "info"
ENV LOG_FORMAT "text"
ENV ASDF_DATA_DIR /root/.asdf
RUN apk add --update bash curl git make go jq python3 py3-pip openssh vim ca-certificates \
&& rm /bin/sh && ln -s /bin/bash /bin/sh \
&& ln -s /usr/bin/python3 /usr/local/bin/python
# Install asdf dependencies
WORKDIR /root
COPY .tool-versions /root/.tool-versions
# COPY pin /root/pin
RUN mkdir -p $ASDF_DATA_DIR \
&& git clone --depth 1 https://github.com/asdf-vm/asdf.git $ASDF_DATA_DIR \
&& . $ASDF_DATA_DIR/asdf.sh \
&& echo -e '\n. $ASDF_DATA_DIR/asdf.sh' >> $HOME/.bashrc \
&& echo -e '\n. $ASDF_DATA_DIR/asdf.sh' >> $HOME/.profile \
&& asdf update \
&& while IFS= read -r line; do asdf plugin add $(echo "$line" | awk '{print $1}'); done < .tool-versions \
&& asdf install \
&& mkdir -p /bashbot \
&& git clone --depth 1 https://github.com/mathew-fleisch/bashbot.git /bashbot
WORKDIR /bashbot
CMD /bin/sh -c ". ${ASDF_DATA_DIR}/asdf.sh && ./entrypoint.sh"