Change into facebooc directory which containts the source code. This assumes you have already cloned the repo. If not, clone it from https://github.com/schoolofdevops/facebooc
cd facebooc
ls
LICENSE Makefile README.md include src static templates
Add/create Dockerfile the the same directory (facebooc) witht the following content,
FROM ubuntu
WORKDIR /opt/facebooc
RUN apt-get update && \
apt-get install -yq build-essential make git libsqlite3-dev sqlite3
COPY . /opt/facebooc
RUN make all
EXPOSE 16000
CMD "bin/facebooc"
Build image using,
docker build -t <docker_id>/facebooc:v2 .
where, <docker_id> : your docker registry user/namespace. Replace this with the actual user
validate
docker image ls
docker image history <docker_id>/facebooc:v2
docker container run -idt -P <docker_id>/facebooc:v2
docker ps
Check by connecting to your host:port to validate if facebooc web application shows up.
Once validated, tag and push
docker image tag <docker_id>/facebooc:v2 <docker_id>/facebooc:latest
docker login
docker push <docker_id>/facebooc