Oh!Super164 取り留めのない日記のような

2025/2/16 日曜日

dockerでsystemctlを使う方法

Filed under: プログラミング,備忘録 — admin @ 17:01:54

PID=1が”init”になるようにする

FROM php:8.2-apache
COPY src/ /var/www/html/
RUN apt-get update
RUN apt-get  -y upgrade
RUN apt-get -y install \
        init \
        systemd \
        git \
        zip \
services:
  app:
    build:
      context: "."
    privileged: true
    command: /sbin/init
    ports:
      - 8080:80
    volumes:
      - ./src:/var/www/html
      - ./php/php.ini:/usr/local/etc/php/php.ini

コメントはまだありません »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress