diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b1626139d5bb3a927485a227c266df885491da35..da53f5652212b118fbb2d08066dade169c47328e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -18,23 +18,14 @@ COPY assets/user-setup.sh /docker/ COPY assets/build-install-openresty.sh /docker/ RUN yum update -y && \ - yum install -y hostname epel-release which wget tar sudo file && \ + sh /docker/setup.sh && \ sh /docker/provide-user.sh ${VSCODE_USER} ${VSCODE_USER_UID} ${VSCODE_GID} && \ - yum clean all && \ - rm -rf /var/cache/yum + yum clean all && rm -rf /var/cache/yum COPY --chown=$VSCODE_USER:$VSCODE_USER assets/nginx-httpg_no_delegation.patch /home/$VSCODE_USER/ COPY --chown=$VSCODE_USER:$VSCODE_USER assets/build-install-ngx-voms.sh /home/$VSCODE_USER/bin/ -RUN sh /docker/setup.sh USER $VSCODE_USER RUN sh /docker/build-install-openresty.sh && \ - sh /docker/user-setup.sh - -USER root - -RUN yum install -y https://repo.ius.io/ius-release-el7.rpm centos-release-scl \ - && yum install -y git224 devtoolset-10 - -USER $VSCODE_USER \ No newline at end of file + sh /docker/user-setup.sh \ No newline at end of file diff --git a/.devcontainer/assets/setup.sh b/.devcontainer/assets/setup.sh index 7238be3e9f30f744a97f70c967f4070140cd1f1c..b07ff16722bccbe80a286814d40180426fe4a89a 100644 --- a/.devcontainer/assets/setup.sh +++ b/.devcontainer/assets/setup.sh @@ -3,6 +3,15 @@ set -ex yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo +yum -y install \ + hostname \ + epel-release \ + which \ + wget \ + tar \ + sudo \ + file + yum -y install \ gcc-c++ \ GeoIP-devel \ @@ -20,3 +29,9 @@ yum -y install \ make \ patch \ less + +yum -y install https://repo.ius.io/ius-release-el7.rpm centos-release-scl + +yum -y install \ + git224 \ + devtoolset-10