-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix docker build #801
Fix docker build #801
Conversation
To fix failing pipline build
The version of Alpine used as the base image here is pinned and the envkey install script has not changed in three years, so it is difficult to see how this broke. However, without installing the sudo package the sudo command in install.sh cannot run and the Dockerfile cannot be built. To ensure that the final image does not change we also remove the sudo package after running the install script.
Avoid errors when building the Dockerfile by: * Creating directories and files that 'poetry install' expects * Adding poetry to the current $PATH
@@ -71,7 +71,9 @@ RUN pip install --no-cache-dir \ | |||
FROM base AS app | |||
|
|||
# Install envkey-source | |||
RUN curl -s https://raw.githubusercontent.com/envkey/envkey-source/master/install.sh | bash | |||
RUN set -ex && apk add --no-cache sudo \ |
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.
Can you set the docker user to root rather than using sudo?
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.
ah... it probably explicitly invokes sudo... sure.
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.
We don't call USER
at all in this file, so I'd assumed the user is already root
(but I didn't check!)
FIX the broken build that can be seen on #800 and https://github.com/nhsx/nhsx-website/actions/runs/10491953953/job/29062294843?pr=800
docker compose
wheredocker-compose
is not availablesudo
package to installenvkey
. The version of Alpine used as the base image here is pinned and the envkey install script has not changed in three years, so it is difficult to see how this broke. However, without installing the sudo package the sudo command in install.sh cannot run and the Dockerfile cannot be built. To ensure that the final image does not change we also remove the sudo package after running the install script.Testing
./script/test
and check it runs green../script/server
and check you can see a running site at http://localhost:5000