Skip to content

Commit

Permalink
fix(docker): revert changes (#12052)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentlp committed Aug 1, 2022
1 parent 6c0378a commit 0742113
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 31 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
yarn run build --linux --prod --verbose
yarn run package --linux
cp build/docker/Dockerfile packages/bp/binaries/
cp build/docker/docker-entrypoint.sh packages/bp/binaries/
- name: DockerHub Authentication
uses: docker/login-action@v1
if: ${{ steps.prep.outputs.release }}
Expand Down
31 changes: 9 additions & 22 deletions build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,26 @@
FROM ubuntu:20.04

ENV BP_WORKDIR=/botpress
ENV BP_USER=botpress
ENV BP_GROUP=botpress
ENV BP_DATA_PATH $BP_WORKDIR/data

ADD . $BP_WORKDIR
WORKDIR $BP_WORKDIR
ADD . /botpress
WORKDIR /botpress

RUN apt update && \
apt install -y wget ca-certificates && \
update-ca-certificates && \
wget -O duckling https://s3.amazonaws.com/botpress-binaries/duckling-example-exe && \
chmod +x duckling && \
chmod +x bp && \
chgrp -R 0 /botpress && \
chmod -R g=u /botpress && \
apt install -y tzdata && \
ln -fs /usr/share/zoneinfo/UTC /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata

RUN chmod +x duckling && chmod +x bp

RUN ./bp extract
dpkg-reconfigure --frontend noninteractive tzdata && \
./bp extract

# Creates botpress user and group
RUN groupadd -g 999 $BP_GROUP && \
useradd -m -r -u 999 -g $BP_GROUP $BP_USER

# Sets ownership of the workdir to the botpress user
RUN chown -R $BP_USER:$BP_GROUP $BP_WORKDIR

ENV BP_MODULE_NLU_DUCKLINGURL=http://localhost:8000
ENV BP_IS_DOCKER=true

ENV LANG=C.UTF-8
EXPOSE 3000

COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]

CMD su - botpress -c "$BP_WORKDIR/duckling & $BP_WORKDIR/bp"
CMD ./duckling & ./bp
8 changes: 0 additions & 8 deletions build/docker/docker-entrypoint.sh

This file was deleted.

0 comments on commit 0742113

Please sign in to comment.