Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning

Place this Dockerfile in the ACS repository at .../Virtualization/Docker/Dev

Code Block
languagebashyml
titledocker-compose.yml
linenumberstrue
collapsetrue
version: "3.4"

x-args: &args
   USER_NAME: ${USER_NAME}
   GROUP_NAME: ${GROUP_NAME}
   USER_ID: ${USER_ID}
   GROUP_ID: ${GROUP_ID}

x-env: &env
   - DISPLAY=${DISPLAY}

x-volumes: &volumes
   - ${REPO_DIR}:/repo:z
   - ${ALMA_DIR}/${CONTAINER_DIR}:/alma:z
   - ${HOME_DIR}/${CONTAINER_DIR}:/home/${USER_NAME}:z
   - /tmp/.X11-unix:/tmp/.X11-unix:z

x-acs-images: &common
   build:
      dockerfile: Dockerfile
      context: ./${IMAGE_OS}
      args:
         *args
   security_opt:
      - seccomp:unconfined
   image: acsdev-${IMAGE_OS}
   # container_name: acsdev_${IMAGE_OS}_run
   environment:
      *env
   volumes:
      *volumes
   working_dir: /home/${USER_NAME}
   ulimits:
      nproc: 62424
      nofile:
         soft: 64000
         hard: 524288
   dns:
     - 8.8.8.8
     - 4.4.4.4
   networks:
    - acs-docker
   extra_hosts:
      - acs:127.0.1.1
   hostname: acs
   container_name: acs_${IMAGE_OS}
   network_mode: host

services:
   centos6:
      <<: *common
   centos7:
      <<: *common
   centos8:
      <<: *common
   stream8:
      <<: *common

networks:
   acs-docker:
      driver: bridge

Env file

Click on "Expand source" to see the code.

...

Code Block
languagebash
title.env
linenumberstrue
collapsetrue
USER_NAME=<my_user>
GROUP_NAME=<my_user>
USER_ID=1000
GROUP_ID=1000
ALMA_DIR=/ACS/docker/alma
HOME_DIR=/ACS/docker/home
REPO_DIR=/absolute/path/to/ACS/repository
IMAGE_OS=stream8
CONTAINER_DIR=stream8

Run and open the container

Code Block
languagebash
# Create directories
sudo mkdir -p /ACS/docker/alma /ACS/docker/home

# Set ownership for directories
sudo chown -R $USER:$USER /ACS

# Run container
cd .../Virtualization/Docker/Dev
docker compose run -d --name acs_stream8 stream8

Set /etc/hosts file

Code Block
languagebash
# Add the following line to /etc/hosts to prevent networking issues
127.0.1.1	acs

Install external products

...

Code Block
languagebash
# Install external products
docker exec -it acs_stream8 bash
source /repo/LGPL/acsBUILD/config/.acs/.bash_profile.acs
cd /repo/ExtProd/INSTALL
make all

Build

...

ACS

Warning

This step must be executed inside a new container terminal.

...