You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
930 B
39 lines
930 B
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"]
|