-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add podman support alongside docker for dev #1135
Merged
metasoarous
merged 1 commit into
compdemocracy:podman-compatibility
from
willcohen:podman
Nov 4, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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 |
---|---|---|
@@ -1,24 +1,90 @@ | ||
ARG TAG=dev | ||
|
||
FROM compdem/polis-client-admin:${TAG} as admin | ||
FROM compdem/polis-client-participation:${TAG} as participation | ||
FROM compdem/polis-client-report:${TAG} as report | ||
# polis-client-admin | ||
# Gulp v3 stops us from upgrading beyond Node v11 | ||
FROM docker.io/node:11.15.0-alpine | ||
|
||
FROM node:16.9.0-alpine | ||
WORKDIR /client-admin/app | ||
|
||
WORKDIR /app | ||
RUN apk add git --no-cache | ||
|
||
COPY package*.json ./ | ||
COPY client-admin/package*.json ./ | ||
RUN npm install | ||
|
||
COPY client-admin/polis.config.template.js polis.config.js | ||
# If polis.config.js exists on host, will override template here. | ||
COPY client-admin/. . | ||
|
||
ARG GIT_HASH | ||
RUN npm run deploy:prod | ||
|
||
# polis-client-participation | ||
# # Gulp v3 stops us from upgrading beyond Node v11 | ||
FROM docker.io/node:11.15.0-alpine | ||
|
||
WORKDIR ../../client-participation/app | ||
|
||
RUN apk add --no-cache --virtual .build \ | ||
g++ git make python | ||
|
||
# Allow global npm installs in Docker | ||
RUN npm config set unsafe-perm true | ||
|
||
# Upgrade npm v6.7.0 -> v6.9.2 to alias multiple pkg versions. | ||
# See: https://stackoverflow.com/a/56134858/504018 | ||
RUN npm install -g [email protected] | ||
|
||
COPY client-participation/package*.json ./ | ||
|
||
RUN npm ci | ||
|
||
RUN apk del .build | ||
|
||
COPY client-participation/polis.config.template.js polis.config.js | ||
# If polis.config.js exists on host, will override template here. | ||
COPY client-participation/. . | ||
|
||
ARG GIT_HASH | ||
ARG BABEL_ENV=production | ||
|
||
RUN npm run deploy:prod | ||
|
||
|
||
# polis-client-report | ||
# Gulp v3 stops us from upgrading beyond Node v11 | ||
FROM docker.io/node:11.15.0-alpine | ||
|
||
WORKDIR ../../client-report/app | ||
|
||
RUN apk add git --no-cache | ||
|
||
COPY client-report/package*.json ./ | ||
RUN npm ci | ||
|
||
COPY client-report/polis.config.template.js polis.config.js | ||
# If polis.config.js exists on host, will override template here. | ||
COPY client-report/. . | ||
|
||
ARG GIT_HASH | ||
RUN npm run deploy:prod | ||
|
||
|
||
FROM docker.io/node:16.9.0-alpine | ||
|
||
WORKDIR ../../file-server/app | ||
|
||
COPY file-server/package*.json ./ | ||
|
||
RUN npm ci | ||
|
||
COPY . . | ||
COPY fs_config.template.json fs_config.json | ||
COPY file-server/. . | ||
COPY file-server/fs_config.template.json fs_config.json | ||
|
||
RUN mkdir /app | ||
RUN mkdir /app/build | ||
COPY --from=admin /app/build/ /app/build | ||
COPY --from=participation /app/build/ /app/build | ||
COPY --from=report /app/build/ /app/build | ||
COPY --from=0 /client-admin/app/build/ /app/build | ||
COPY --from=1 /client-participation/app/build/ /app/build | ||
COPY --from=2 /client-report/app/build/ /app/build | ||
|
||
EXPOSE 8080 | ||
|
||
|
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM clojure:tools-deps | ||
FROM docker.io/clojure:tools-deps | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:14.14.0-alpine | ||
FROM docker.io/node:14.14.0-alpine | ||
|
||
WORKDIR /app | ||
|
||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be just
/client-participation/app
. Or even/app
, since you end up getting a new image for each call toFROM
IIUC.