Skip to content

Instantly share code, notes, and snippets.

Last active October 16, 2017 12:56
What would you like to do?
Dockerization of the connect-release

Dockerization of the connect-release


Folder structure:

|_ project
  |_ assets
    |_ connect-release.tar.gz
  |_ Dockerfile

File Dockerfile:

FROM ubuntu:16.04

SHELL ["/bin/bash", "-c"]

ENV ARCH_FILE=connect-release.tar.gz \
  FOLDER=connect-release \
  EXECUTABLE=ShazzleMailConnect \


COPY assets/${ARCH_FILE} /

# Prerequisites
RUN apt-get update \
  && DEBIAN_FRONEND=noninteractive apt-get install -y libglu1 libgtk2.0-0 libsm6 \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/*

# Prepare the executable
RUN tar -zxf ${ARCH_FILE} \
  && rm ${ARCH_FILE} \
  && chmod +x ${FOLDER}/${EXECUTABLE}


ENTRYPOINT ["./ShazzleMailConnect"]


Build docker images:

cd project
docker build -t connect .

List available images:

docker images

Remove unnecessary image:

docker rmi conn

Run the container

Run in detached mode:

# be sure, there is no other container with the same name
docker stop conn

# remove older container, if not needed anymore
docker rm conn

# run the container in detached mode, give it a name conn
docker run --name conn -d connect

# show logs
docker logs --follow --tail conn

Connect into running container

docker exec -it conn bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment