Feat(ktm-booking): Initial commit
Some checks failed
ktm-booking-bot/ktm-booking-bot/pipeline/head Something is wrong with the build of this commit
Some checks failed
ktm-booking-bot/ktm-booking-bot/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
39
docker/Dockerfile
Normal file
39
docker/Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM golang:1.19-buster as go-builder
|
||||
|
||||
COPY . /build
|
||||
|
||||
WORKDIR /build/
|
||||
RUN /build/scripts/build.sh
|
||||
|
||||
RUN git clone https://git.samuelpua.com/telboon/messenger /messenger
|
||||
WORKDIR /messenger
|
||||
RUN go build git.samuelpua.com/telboon/messenger/cmd/messenger
|
||||
|
||||
|
||||
FROM ubuntu
|
||||
ENV debian_frontend=noninteractive
|
||||
|
||||
WORKDIR /app/
|
||||
RUN apt update
|
||||
RUN apt install -y ca-certificates
|
||||
RUN apt install -y tzdata
|
||||
RUN apt install -y wget
|
||||
RUN ln -fs /usr/share/zoneinfo/Asia/Singapore /etc/localtime
|
||||
RUN dpkg-reconfigure --frontend noninteractive tzdata
|
||||
|
||||
# Install Chrome
|
||||
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
RUN apt install -y ./google-chrome-stable_current_amd64.deb
|
||||
|
||||
COPY --from=go-builder /messenger/messenger /app/messenger
|
||||
|
||||
COPY --from=go-builder /build/backend/server /app/server
|
||||
COPY .env /app/.env
|
||||
|
||||
RUN useradd -ms /bin/bash bot
|
||||
USER bot
|
||||
|
||||
ENV TZ="Asia/Singapore"
|
||||
RUN date
|
||||
|
||||
ENTRYPOINT ["/app/server"]
|
||||
Reference in New Issue
Block a user