Skip to content
Michael Kenney edited this page Mar 17, 2018 · 2 revisions

A simple docker-compose dev build solution for specifying the UID and GID of the process. This may not work as expected in Docker for Mac.

version: '3'
services:
    httpd:
        container_name: "http"
        image: nginx
        volumes:
            - .:/var/www/html/
    npm:
        container_name: "http.npm"
        image: mkenney/npm:node-8-alpine
        stdin_open: true
        tty: true
        command: ["npm", "install"]
        environment:
            - PUID=1001
            - PGID=1001
        volumes:
            - .:/src

About the run-as-user script

Public key access to private repositories

Specify UID and GID values

Override the run-as-user script entirely

Clone this wiki locally