Skip to content

Commit

Permalink
chore: resolve github warnings raised in dockerfile (#47)
Browse files Browse the repository at this point in the history
remove unfied workflow

Co-authored-by: Muhammad Farhan <[email protected]>
  • Loading branch information
huniafatima-arbi and mfarhan943 authored Oct 29, 2024
1 parent 7001d68 commit 3efb825
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 93 deletions.
10 changes: 5 additions & 5 deletions dockerfiles/commerce-coordinator.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app
MAINTAINER [email protected]

Check warning on line 2 in dockerfiles/commerce-coordinator.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/commerce-coordinator.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/commerce-coordinator.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/commerce-coordinator.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/commerce-coordinator.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/


Expand Down Expand Up @@ -37,11 +37,11 @@ RUN rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python3 /usr/bin/python

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ENV DJANGO_SETTINGS_MODULE commerce_coordinator.settings.production
ENV DJANGO_SETTINGS_MODULE=commerce_coordinator.settings.production

EXPOSE 8140

Expand Down
9 changes: 5 additions & 4 deletions dockerfiles/course-discovery.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app

ARG PYTHON_VERSION=3.12

Expand Down Expand Up @@ -75,7 +75,7 @@ RUN npm install --production && ./node_modules/.bin/bower install --allow-root -
# Expose canonical Discovery port
EXPOSE 8381

FROM app as prod
FROM app AS prod

ENV DJANGO_SETTINGS_MODULE "course_discovery.settings.production"

Expand All @@ -85,7 +85,7 @@ RUN DISCOVERY_CFG=minimal.yml OPENEDX_ATLAS_PULL=true make pull_translations

CMD gunicorn --bind=0.0.0.0:8381 --workers 2 --max-requests=1000 -c course_discovery/docker_gunicorn_configuration.py course_discovery.wsgi:application

FROM app as dev
FROM app AS dev

ENV DJANGO_SETTINGS_MODULE "course_discovery.settings.devstack"

Check warning on line 90 in dockerfiles/course-discovery.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 90 in dockerfiles/course-discovery.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 90 in dockerfiles/course-discovery.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 90 in dockerfiles/course-discovery.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 90 in dockerfiles/course-discovery.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Expand All @@ -101,6 +101,7 @@ CMD while true; do python ./manage.py runserver 0.0.0.0:8381; sleep 2; done

###########################################################
# Define k8s target
FROM prod as kubernetes

FROM prod AS kubernetes
ENV DISCOVERY_SETTINGS='kubernetes'
ENV DJANGO_SETTINGS_MODULE="course_discovery.settings.$DISCOVERY_SETTINGS"
16 changes: 8 additions & 8 deletions dockerfiles/credentials.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as base
FROM ubuntu:focal AS base

# System requirements
# - git; Used to pull in particular requirements from github rather than pypi,
Expand Down Expand Up @@ -35,12 +35,12 @@ ENV PATH="$NODE_ENV/bin:$PATH"
RUN npm install -g [email protected]

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DJANGO_SETTINGS_MODULE credentials.settings.production
ENV OPENEDX_ATLAS_PULL true
ENV CREDENTIALS_CFG "minimal.yml"
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV DJANGO_SETTINGS_MODULE=credentials.settings.production
ENV OPENEDX_ATLAS_PULL=true
ENV CREDENTIALS_CFG="minimal.yml"

Check warning on line 43 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "CREDENTIALS_CFG") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 43 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "CREDENTIALS_CFG") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 43 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "CREDENTIALS_CFG") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 43 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "CREDENTIALS_CFG") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 43 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "CREDENTIALS_CFG") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

EXPOSE 18150
RUN useradd -m --shell /bin/false app
Expand Down Expand Up @@ -94,7 +94,7 @@ CMD gunicorn --workers=2 --name credentials -c /edx/app/credentials/credentials/

# We don't switch back to the app user for devstack because we need devstack users to be
# able to update requirements and generally run things as root.
FROM base as dev
FROM base AS dev
USER root
ENV DJANGO_SETTINGS_MODULE credentials.settings.devstack

Check warning on line 99 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 99 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 99 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 99 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 99 in dockerfiles/credentials.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
RUN pip install -r /edx/app/credentials/credentials/requirements/dev.txt
Expand Down
6 changes: 3 additions & 3 deletions dockerfiles/ecommerce.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app

ENV DEBIAN_FRONTEND noninteractive

Check warning on line 3 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 3 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 3 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 3 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 3 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
# System requirements.
Expand Down Expand Up @@ -55,7 +55,7 @@ RUN npm install --production && ./node_modules/.bin/bower install --allow-root -
# Expose canonical ecommerce port
EXPOSE 18130

FROM app as prod
FROM app AS prod

ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.production"

Expand All @@ -71,7 +71,7 @@ RUN curl -L https://github.com/edx/ecommerce/archive/refs/heads/2u/main.tar.gz |

CMD gunicorn --bind=0.0.0.0:18130 --workers 2 --max-requests=1000 -c ecommerce/docker_gunicorn_configuration.py ecommerce.wsgi:application

FROM app as dev
FROM app AS dev

ENV DJANGO_SETTINGS_MODULE "ecommerce.settings.devstack"

Check warning on line 76 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 76 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 76 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 76 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 76 in dockerfiles/ecommerce.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Expand Down
28 changes: 14 additions & 14 deletions dockerfiles/edx-analytics-dashboard.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

ARG PYTHON_VERSION=3.8

Expand Down Expand Up @@ -30,23 +30,23 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

# ENV variables lifetime is bound to the container whereas ARGS variables lifetime is bound to the image building process only
# Also ARGS provide us an option of compatibility of Path structure for Tutor and other OpenedX installations
ARG COMMON_CFG_DIR "/edx/etc"
ARG COMMON_CFG_DIR="/edx/etc"
ARG COMMON_APP_DIR="/edx/app"
ARG INSIGHTS_APP_DIR="${COMMON_APP_DIR}/insights"
ARG INSIGHTS_VENV_DIR="${COMMON_APP_DIR}/insights/venvs/insights"
ARG INSIGHTS_CODE_DIR="${INSIGHTS_APP_DIR}/edx_analytics_dashboard"
ARG INSIGHTS_NODEENV_DIR="${COMMON_APP_DIR}/insights/nodeenvs/insights"

ENV PATH "${INSIGHTS_VENV_DIR}/bin:${INSIGHTS_NODEENV_DIR}/bin:$PATH"
ENV INSIGHTS_APP_DIR ${INSIGHTS_APP_DIR}
ENV THEME_SCSS "sass/themes/open-edx.scss"
ENV PYTHON_VERSION "${PYTHON_VERSION}"
ENV PATH="${INSIGHTS_VENV_DIR}/bin:${INSIGHTS_NODEENV_DIR}/bin:$PATH"
ENV INSIGHTS_APP_DIR=${INSIGHTS_APP_DIR}
ENV THEME_SCSS="sass/themes/open-edx.scss"
ENV PYTHON_VERSION="${PYTHON_VERSION}"

RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION}
RUN pip install virtualenv
Expand Down Expand Up @@ -75,20 +75,20 @@ RUN npm set progress=false && npm ci
EXPOSE 8110
EXPOSE 18110

FROM app as dev
FROM app AS dev

RUN pip install --no-cache-dir -r requirements/local.txt

ENV DJANGO_SETTINGS_MODULE "analytics_dashboard.settings.devstack"
ENV DJANGO_SETTINGS_MODULE="analytics_dashboard.settings.devstack"

# Backwards compatibility with devstack
RUN touch "${INSIGHTS_APP_DIR}/insights_env"

CMD while true; do python ./manage.py runserver 0.0.0.0:8110; sleep 2; done

Check warning on line 87 in dockerfiles/edx-analytics-dashboard.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 87 in dockerfiles/edx-analytics-dashboard.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 87 in dockerfiles/edx-analytics-dashboard.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 87 in dockerfiles/edx-analytics-dashboard.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 87 in dockerfiles/edx-analytics-dashboard.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

FROM app as prod
FROM app AS prod

ENV DJANGO_SETTINGS_MODULE "analytics_dashboard.settings.production"
ENV DJANGO_SETTINGS_MODULE="analytics_dashboard.settings.production"

CMD gunicorn \
--pythonpath=/edx/app/insights/edx_analytics_dashboard/analytics_dashboard \
Expand Down
26 changes: 13 additions & 13 deletions dockerfiles/edx-analytics-data-api.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as base
FROM ubuntu:focal AS base

# System requirements.

Expand All @@ -17,7 +17,7 @@ RUN apt-get update && \

RUN apt-get update && \
apt-get install -qy \
build-essential \
build-essential \
curl \
vim \
language-pack-en \
Expand All @@ -39,21 +39,21 @@ RUN pip install virtualenv

# Use UTF-8.
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

ARG COMMON_APP_DIR="/edx/app"
ARG ANALYTICS_API_SERVICE_NAME="analytics_api"
ENV ANALYTICS_API_HOME "${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}"
ENV ANALYTICS_API_HOME="${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}"
ARG ANALYTICS_API_APP_DIR="${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}"
ARG ANALYTICS_API_VENV_DIR="${COMMON_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}/venvs/${ANALYTICS_API_SERVICE_NAME}"
ARG ANALYTICS_API_CODE_DIR="${ANALYTICS_API_APP_DIR}/${ANALYTICS_API_SERVICE_NAME}"

ENV ANALYTICS_API_CODE_DIR="${ANALYTICS_API_CODE_DIR}"
ENV PATH "${ANALYTICS_API_VENV_DIR}/bin:$PATH"
ENV COMMON_CFG_DIR "/edx/etc"
ENV ANALYTICS_API_CFG "/edx/etc/${ANALYTICS_API_SERVICE_NAME}.yml"
ENV PATH="${ANALYTICS_API_VENV_DIR}/bin:$PATH"
ENV COMMON_CFG_DIR="/edx/etc"
ENV ANALYTICS_API_CFG="/edx/etc/${ANALYTICS_API_SERVICE_NAME}.yml"

# Working directory will be root of repo.
WORKDIR ${ANALYTICS_API_CODE_DIR}
Expand All @@ -66,9 +66,9 @@ RUN mkdir -p requirements
# Expose canonical Analytics port
EXPOSE 19001

FROM base as prod
FROM base AS prod

ENV DJANGO_SETTINGS_MODULE "analyticsdataserver.settings.production"
ENV DJANGO_SETTINGS_MODULE="analyticsdataserver.settings.production"


RUN curl -L -o requirements/production.txt https://raw.githubusercontent.com/edx/edx-analytics-data-api/master/requirements/production.txt
Expand All @@ -85,9 +85,9 @@ RUN curl -L https://github.com/edx/edx-analytics-data-api/archive/refs/heads/mas

CMD ["gunicorn" , "-b", "0.0.0.0:8100", "--pythonpath", "/edx/app/analytics_api/analytics_api","analyticsdataserver.wsgi:application"]

FROM base as dev
FROM base AS dev

ENV DJANGO_SETTINGS_MODULE "analyticsdataserver.settings.devstack"
ENV DJANGO_SETTINGS_MODULE="analyticsdataserver.settings.devstack"

RUN curl -L -o requirements/dev.txt https://raw.githubusercontent.com/edx/edx-analytics-data-api/master/requirements/dev.txt

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/edx-exams.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app
LABEL org.opencontainers.image.authors="[email protected]"


Expand Down
18 changes: 9 additions & 9 deletions dockerfiles/edx-notes-api.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app

# Packages installed:
# git; Used to pull in particular requirements from github rather than pypi,
Expand Down Expand Up @@ -36,9 +36,9 @@ RUN apt-get update && \


RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8


# ENV variables lifetime is bound to the container whereas ARGS variables lifetime is bound to the image building process only
Expand Down Expand Up @@ -70,9 +70,9 @@ RUN mkdir -p /edx/var/log

EXPOSE 8120

FROM app as dev
FROM app AS dev

ENV DJANGO_SETTINGS_MODULE "notesserver.settings.devstack"
ENV DJANGO_SETTINGS_MODULE="notesserver.settings.devstack"

# Backwards compatibility with devstack
RUN touch "${COMMON_APP_DIR}/edx_notes_api_env"
Expand All @@ -81,10 +81,10 @@ RUN curl -L https://github.com/openedx/edx-notes-api/archive/refs/heads/master.t

CMD while true; do python ./manage.py runserver 0.0.0.0:8120; sleep 2; done

Check warning on line 82 in dockerfiles/edx-notes-api.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 82 in dockerfiles/edx-notes-api.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

FROM app as production
FROM app AS production

ENV EDXNOTES_CONFIG_ROOT /edx/etc
ENV DJANGO_SETTINGS_MODULE "notesserver.settings.yaml_config"
ENV EDXNOTES_CONFIG_ROOT=/edx/etc
ENV DJANGO_SETTINGS_MODULE="notesserver.settings.yaml_config"

RUN curl -L https://github.com/openedx/edx-notes-api/archive/refs/heads/master.tar.gz | tar -xz --strip-components=1

Expand Down
1 change: 0 additions & 1 deletion dockerfiles/enterprise-access.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ RUN pip install newrelic
CMD newrelic-admin run-program gunicorn --workers=2 --name enterprise-access -c /edx/app/enterprise-access/enterprise_access/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_access.wsgi:application

FROM app AS devstack

USER root
RUN pip install -r requirements/dev.txt

Expand Down
6 changes: 3 additions & 3 deletions dockerfiles/enterprise-catalog.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app
MAINTAINER [email protected]

Check warning on line 2 in dockerfiles/enterprise-catalog.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/enterprise-catalog.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/enterprise-catalog.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/enterprise-catalog.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

# Packages installed:
Expand Down Expand Up @@ -89,7 +89,7 @@ CMD ["gunicorn", "--workers=2", "--name", "enterprise_catalog", "-c", "/edx/app/
# Create newrelic image used by the experimental docker shim. #
###############################################################
# TODO: remove this after we migrate to k8s since it will serve no more purpose.
FROM app as newrelic
FROM app AS newrelic
RUN pip install newrelic
CMD ["newrelic-admin", "run-program", "gunicorn", "--workers=2", "--name", "enterprise_catalog", "-c", "/edx/app/enterprise_catalog/enterprise_catalog/enterprise_catalog/docker_gunicorn_configuration.py", "--log-file", "-", "--max-requests=1000", "enterprise_catalog.wsgi:application"]

Expand All @@ -98,7 +98,7 @@ CMD ["newrelic-admin", "run-program", "gunicorn", "--workers=2", "--name", "ente
#################################
# TODO: remove this after we migrate to k8s. It already isn't used today, but just defer changes until absolutely
# necessary for safety.
FROM app as legacy_devapp
FROM app AS legacy_devapp
# Dev ports
EXPOSE 18160
EXPOSE 18161
Expand Down
14 changes: 7 additions & 7 deletions dockerfiles/enterprise-subsidy.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app
MAINTAINER [email protected]

Check warning on line 2 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Check warning on line 2 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

The MAINTAINER instruction is deprecated, use a label instead to define an image author

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

# Packages installed:
Expand Down Expand Up @@ -73,10 +73,10 @@ RUN virtualenv -p python${PYTHON_VERSION} $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DJANGO_SETTINGS_MODULE enterprise_subsidy.settings.production
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV DJANGO_SETTINGS_MODULE=enterprise_subsidy.settings.production

EXPOSE 18280
RUN useradd -m --shell /bin/false app
Expand All @@ -102,11 +102,11 @@ USER app
CMD gunicorn --workers=2 --name enterprise-subsidy -c /edx/app/enterprise-subsidy/enterprise_subsidy/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_subsidy.wsgi:application

Check warning on line 102 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 102 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 102 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 102 in dockerfiles/enterprise-subsidy.Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push-image

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/


FROM app as newrelic
FROM app AS newrelic
RUN pip install newrelic
CMD gunicorn --workers=2 --name enterprise-subsidy -c /edx/app/enterprise-subsidy/enterprise_subsidy/docker_gunicorn_configuration.py --log-file - --max-requests=1000 enterprise_subsidy.wsgi:application

FROM app as devstack
FROM app AS devstack
USER root
RUN pip install -r requirements/dev.txt
USER app
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/portal-designer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:focal as app
FROM ubuntu:focal AS app
MAINTAINER [email protected]

# ENV variables for Python 3.12 support
Expand Down Expand Up @@ -80,7 +80,7 @@ USER app
CMD gunicorn --workers=2 --name designer -c /edx/app/designer/designer/docker_gunicorn_configuration.py --log-file - --max-requests=1000 designer.wsgi:application

# Change into dev app
FROM app as devstack
FROM app AS devstack
# Install dependencies as root and revert back to application user
USER root
RUN pip install -r /edx/app/designer/requirements/dev.txt
Expand Down
Loading

0 comments on commit 3efb825

Please sign in to comment.