Docker Community Forums

Share and learn in the Docker community.

Custom Image for CicleCi

Hi,

I am a complete idiot when it comes to Docker.

I need to be able to run a LibreOffice’s ‘soffice’ command in CircleCi. I want it to be an image which goes into the CircleCi config yml file and my parents container to be able to access this functionality.

I am able to do, docker run my-docker-repo/libre soffice --headless — works just fine locally, but how do I run this same command from CircleCi build step?

Thanks ahead of time!

This is my setup copied from circleci somewhere.

FROM circleci/openjdk:8u232-jdk-stretch

RUN whoami

USER root

RUN apt-get update
RUN apt-get -y install libreoffice --no-install-recommends --no-install-suggests

# Basic smoke test
RUN which soffice
RUN soffice --version

USER circleci

Upload your image to a container registry and specify it as the executor in .circleci/config.yml.

jobs:
  build:
    docker:
      - image: my-docker-repo/libre

Docs: https://circleci.com/docs/2.0/configuration-reference/#docker--machine--macos--windows-executor

Maxim,

Thanks for the input.

I did just that but without luck.

When I try to run “soffice” or by calling it by its full path, it says not found. Do I have to somehow expose that function to the parent container?

Not sure what you mean by parent container. Where are trying to call “soffice” exactly?

Assuming you have an image uploaded to Docker Hub that can run “soffice”, this should work:

jobs:
  build:
    docker:
      - image: my-docker-repo/libre
    steps:
      - run: soffice