-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare Docker container for automated builds
- Loading branch information
1 parent
c0bf6e3
commit 7cb723f
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node: | ||
build: docker/Node | ||
volumes: | ||
- .:/workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM fedora:latest | ||
|
||
RUN curl --silent --location https://rpm.nodesource.com/setup_7.x | bash - | ||
RUN dnf install -y git nodejs | ||
RUN mkdir /home/docker-container-user | ||
RUN mkdir /workspace | ||
RUN useradd -d /home/docker-container-user -s /bin/bash docker-container-user | ||
RUN npm install --global grunt-cli | ||
RUN npm install --global bower | ||
|
||
COPY ./init-container.sh /root/init-container.sh | ||
WORKDIR /workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env sh | ||
|
||
# This script is to be executed when the docker container is started | ||
|
||
# Set UID of user docker-container-user on guest to match the UID of the user on the host machine | ||
usermod -u $(stat -c "%u" $1) docker-container-user | ||
# Set GID of group docker-container-user on guest to match the GID of the users primary group on the host machine | ||
groupmod -g $(stat -c "%g" $1) docker-container-user | ||
|
||
chown -R docker-container-user /home/docker-container-user | ||
chown -R docker-container-user /workspace |