This repository has been archived by the owner on Jul 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐳 finish from building all botway docker files, images, and tags
- Loading branch information
1 parent
5553646
commit f541955
Showing
7 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM botwayorg/botway:core AS core | ||
FROM alpine:latest | ||
|
||
RUN apk update && apk add bash sudo | ||
|
||
ENV BOTWAY_DIR /botway-dir/ | ||
|
||
RUN addgroup --gid 1000 botway \ | ||
&& adduser --uid 1000 --disabled-password botway --ingroup botway \ | ||
&& mkdir -p $BOTWAY_DIR \ | ||
&& chown botway:botway $BOTWAY_DIR | ||
|
||
COPY --from=core /botway /bin/botway | ||
COPY ./entry.sh /usr/local/bin/docker-entrypoint.sh | ||
|
||
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD [ "help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM botwayorg/botway:core AS core | ||
FROM centos:8 | ||
|
||
ENV BOTWAY_DIR /botway-dir/ | ||
|
||
RUN groupadd -g 1993 botway \ | ||
&& adduser -u 1993 -g botway botway \ | ||
&& mkdir $BOTWAY_DIR \ | ||
&& chown botway:botway $BOTWAY_DIR | ||
|
||
COPY --from=core /botway /bin/botway | ||
|
||
COPY ./entry.sh /usr/local/bin/docker-entrypoint.sh | ||
|
||
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD ["help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM buildpack-deps:20.04-curl AS download | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get update \ | ||
&& apt-get install -y unzip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl -s https://get-latest.herokuapp.com/abdfnx/botway >> tag.txt | ||
|
||
RUN curl -fsSL "https://github.com/abdfnx/botway/releases/download/$(cat tag.txt)/botway_linux_$(cat tag.txt)_amd64.zip" \ | ||
--output botway.zip \ | ||
&& unzip botway.zip \ | ||
&& rm botway.zip \ | ||
&& mv "botway_linux_$(cat tag.txt)_amd64/bin/botway" . \ | ||
&& chmod 755 botway | ||
|
||
FROM scratch | ||
|
||
COPY --from=download /botway /botway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM botwayorg/botway:core AS core | ||
FROM debian:stable-slim | ||
|
||
ENV BOTWAY_DIR /botway-dir/ | ||
|
||
RUN useradd --uid 1993 --user-group botway \ | ||
&& mkdir $BOTWAY_DIR \ | ||
&& chown botway:botway $BOTWAY_DIR | ||
|
||
COPY --from=core /botway /usr/bin/botway | ||
COPY ./entry.sh /usr/local/bin/docker-entrypoint.sh | ||
|
||
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD ["help"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM botwayorg/botway:core AS core | ||
FROM gcr.io/distroless/cc | ||
|
||
ENV BOTWAY_DIR /botway-dir/ | ||
|
||
COPY --from=core /botway /bin/botway | ||
|
||
ENTRYPOINT ["/bin/botway"] | ||
CMD [ "help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ "$1" != "${1#-}" ]; then | ||
# if the first argument is an option like `--help` or `-h` | ||
exec botway "$@" | ||
fi | ||
|
||
case "$1" in | ||
docker | help | init | new | remove | tokens | version ) | ||
exec botway "$@";; | ||
esac | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM botwayorg/botway:core AS core | ||
FROM ubuntu:20.04 | ||
|
||
ENV BOTWAY_DIR /botway-dir/ | ||
|
||
RUN useradd --uid 1993 --user-group botway \ | ||
&& mkdir $BOTWAY_DIR \ | ||
&& chown botway:botway $BOTWAY_DIR | ||
|
||
COPY --from=core /botway /usr/bin/botway | ||
COPY ./entry.sh /usr/local/bin/docker-entrypoint.sh | ||
|
||
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD ["help"] |