Skip to content
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

Day-20 @ #309

Open
Obasoro opened this issue Jan 27, 2023 · 22 comments
Open

Day-20 @ #309

Obasoro opened this issue Jan 27, 2023 · 22 comments

Comments

@Obasoro
Copy link
Contributor

Obasoro commented Jan 27, 2023

I am getting this error whenever I try building the dockerfile or run.sh file
Screenshot 2023-01-26 at 04 51 37

@github-actions
Copy link
Contributor

Hello there, thanks for opening your first issue here. We welcome you to the #90DaysOfDevOps community!

@MichaelCade
Copy link
Owner

@asankov are you able to support

@asankov
Copy link
Contributor

asankov commented Jan 28, 2023

I will take a look in the new few days.

@MichaelCade
Copy link
Owner

Giving this a bump @asankov if you have time this week please, @Obasoro are you still having this issue?

@asankov
Copy link
Contributor

asankov commented Feb 20, 2023

Sorry, Michael. Will take a look soon. Can you assign me to the issue, please?

@Obasoro
Copy link
Contributor Author

Obasoro commented Feb 23, 2023

Still the same maybe because it MI environment issue. I would try it on full debian (ubuntu) and see if is the same.

@asankov
Copy link
Contributor

asankov commented Feb 23, 2023

@Obasoro can you provide full error log? I see the error in the screenshot, but don't see the root cause. Maybe the full log will provide more info. Also, it would be good to describe your environment - OS, CPU, etc. so that we can raise this issue to upstream - https://github.com/rstatsinger/contrast-java-webgoat-docker

@Obasoro
Copy link
Contributor Author

Obasoro commented Feb 26, 2023

@asankov I have attached the error log screenshot.
Screenshot 2023-02-26 at 10 09 02

@asankov
Copy link
Contributor

asankov commented Feb 26, 2023

@Obasoro I know that you attached the logs but I told you that I can't figure out the issue from these logs, because these are not the whole logs. There are more logs that are missing here. Please attach ALL logs after the invocation of ‘run.sh’.

Also, please attach the logs as text, not as screenshot so that I can copy-paste from them.

@Obasoro
Copy link
Contributor Author

Obasoro commented Feb 26, 2023

@asankov
the whole error log

=> ERROR [3/3] RUN apt-get update   && apt-get install -y gnupg   && curl https://pkg.contrastsecurity.co  67.7s
------                                                                                                            
 > [3/3] RUN apt-get update   && apt-get install -y gnupg   && curl https://pkg.contrastsecurity.com/api/gpg/key/public | apt-key add -   && echo "deb https://pkg.contrastsecurity.com/debian-public/ all contrast" > /etc/apt/sources.list.d/contrast-all.list   && apt-get update   && apt-get install -y contrast-java-agent:                     
#0 1.234 Get:1 http://deb.debian.org/debian buster InRelease [122 kB]                                             
#0 1.976 Get:2 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]                           
#0 2.150 Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
#0 2.450 Get:4 http://deb.debian.org/debian buster/main arm64 Packages [7,737 kB]
#0 24.43 Get:5 http://deb.debian.org/debian-security buster/updates/main arm64 Packages [451 kB]
#0 25.33 Get:6 http://deb.debian.org/debian buster-updates/main arm64 Packages [8,780 B]
#0 25.76 Fetched 8,410 kB in 25s (335 kB/s)
#0 25.76 Reading package lists...
#0 26.77 Reading package lists...
#0 27.48 Building dependency tree...
#0 27.59 Reading state information...
#0 27.67 The following additional packages will be installed:
#0 27.67   dirmngr gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server
#0 27.67   gpgconf gpgsm libassuan0 libksba8 libnpth0 libreadline7 libsqlite3-0
#0 27.67   lsb-base pinentry-curses readline-common
#0 27.67 Suggested packages:
#0 27.67   dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage
#0 27.67   scdaemon pinentry-doc readline-doc
#0 27.81 The following NEW packages will be installed:
#0 27.81   dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
#0 27.81   gpg-wks-server gpgconf gpgsm libassuan0 libksba8 libnpth0 libreadline7
#0 27.81   libsqlite3-0 lsb-base pinentry-curses readline-common
#0 28.44 0 upgraded, 18 newly installed, 0 to remove and 3 not upgraded.
#0 28.44 Need to get 7,772 kB of archives.
#0 28.44 After this operation, 16.6 MB of additional disk space will be used.
#0 28.44 Get:1 http://deb.debian.org/debian buster/main arm64 readline-common all 7.0-5 [70.6 kB]
#0 28.98 Get:2 http://deb.debian.org/debian-security buster/updates/main arm64 libsqlite3-0 arm64 3.27.2-3+deb10u2 [603 kB]
#0 30.95 Get:3 http://deb.debian.org/debian buster/main arm64 libassuan0 arm64 2.5.2-1 [47.1 kB]
#0 31.10 Get:4 http://deb.debian.org/debian buster/main arm64 libreadline7 arm64 7.0-5 [134 kB]
#0 31.66 Get:5 http://deb.debian.org/debian buster/main arm64 gpgconf arm64 2.2.12-1+deb10u2 [504 kB]
#0 32.84 Get:6 http://deb.debian.org/debian buster/main arm64 lsb-base all 10.2019051400 [28.4 kB]
#0 32.96 Get:7 http://deb.debian.org/debian-security buster/updates/main arm64 libksba8 arm64 1.3.5-2+deb10u2 [96.6 kB]
#0 33.16 Get:8 http://deb.debian.org/debian buster/main arm64 libnpth0 arm64 1.6-1 [17.6 kB]
#0 33.16 Get:9 http://deb.debian.org/debian buster/main arm64 dirmngr arm64 2.2.12-1+deb10u2 [694 kB]
#0 35.05 Get:10 http://deb.debian.org/debian buster/main arm64 gnupg-l10n all 2.2.12-1+deb10u2 [1,009 kB]
#0 37.28 Get:11 http://deb.debian.org/debian buster/main arm64 gnupg-utils arm64 2.2.12-1+deb10u2 [824 kB]
#0 39.66 Get:12 http://deb.debian.org/debian buster/main arm64 gpg arm64 2.2.12-1+deb10u2 [827 kB]
#0 41.69 Get:13 http://deb.debian.org/debian buster/main arm64 pinentry-curses arm64 1.1.0-2 [62.7 kB]
#0 41.78 Get:14 http://deb.debian.org/debian buster/main arm64 gpg-agent arm64 2.2.12-1+deb10u2 [601 kB]
#0 43.47 Get:15 http://deb.debian.org/debian buster/main arm64 gpg-wks-client arm64 2.2.12-1+deb10u2 [478 kB]
#0 44.76 Get:16 http://deb.debian.org/debian buster/main arm64 gpg-wks-server arm64 2.2.12-1+deb10u2 [472 kB]
#0 45.87 Get:17 http://deb.debian.org/debian buster/main arm64 gpgsm arm64 2.2.12-1+deb10u2 [586 kB]
#0 47.51 Get:18 http://deb.debian.org/debian buster/main arm64 gnupg all 2.2.12-1+deb10u2 [715 kB]
#0 58.61 debconf: delaying package configuration, since apt-utils is not installed
#0 58.75 Fetched 7,772 kB in 22s (355 kB/s)
#0 58.84 Selecting previously unselected package readline-common.
(Reading database ... 7769 files and directories currently installed.)
#0 58.93 Preparing to unpack .../00-readline-common_7.0-5_all.deb ...
#0 58.93 Unpacking readline-common (7.0-5) ...
#0 59.02 Selecting previously unselected package libsqlite3-0:arm64.
#0 59.03 Preparing to unpack .../01-libsqlite3-0_3.27.2-3+deb10u2_arm64.deb ...
#0 59.05 Unpacking libsqlite3-0:arm64 (3.27.2-3+deb10u2) ...
#0 59.24 Selecting previously unselected package libassuan0:arm64.
#0 59.24 Preparing to unpack .../02-libassuan0_2.5.2-1_arm64.deb ...
#0 59.25 Unpacking libassuan0:arm64 (2.5.2-1) ...
#0 59.31 Selecting previously unselected package libreadline7:arm64.
#0 59.31 Preparing to unpack .../03-libreadline7_7.0-5_arm64.deb ...
#0 59.31 Unpacking libreadline7:arm64 (7.0-5) ...
#0 59.35 Selecting previously unselected package gpgconf.
#0 59.35 Preparing to unpack .../04-gpgconf_2.2.12-1+deb10u2_arm64.deb ...
#0 59.36 Unpacking gpgconf (2.2.12-1+deb10u2) ...
#0 59.42 Selecting previously unselected package lsb-base.
#0 59.42 Preparing to unpack .../05-lsb-base_10.2019051400_all.deb ...
#0 59.44 Unpacking lsb-base (10.2019051400) ...
#0 59.55 Selecting previously unselected package libksba8:arm64.
#0 59.55 Preparing to unpack .../06-libksba8_1.3.5-2+deb10u2_arm64.deb ...
#0 59.56 Unpacking libksba8:arm64 (1.3.5-2+deb10u2) ...
#0 59.64 Selecting previously unselected package libnpth0:arm64.
#0 59.64 Preparing to unpack .../07-libnpth0_1.6-1_arm64.deb ...
#0 59.64 Unpacking libnpth0:arm64 (1.6-1) ...
#0 59.68 Selecting previously unselected package dirmngr.
#0 59.69 Preparing to unpack .../08-dirmngr_2.2.12-1+deb10u2_arm64.deb ...
#0 59.71 Unpacking dirmngr (2.2.12-1+deb10u2) ...
#0 59.77 Selecting previously unselected package gnupg-l10n.
#0 59.77 Preparing to unpack .../09-gnupg-l10n_2.2.12-1+deb10u2_all.deb ...
#0 59.77 Unpacking gnupg-l10n (2.2.12-1+deb10u2) ...
#0 59.91 Selecting previously unselected package gnupg-utils.
#0 59.91 Preparing to unpack .../10-gnupg-utils_2.2.12-1+deb10u2_arm64.deb ...
#0 59.91 Unpacking gnupg-utils (2.2.12-1+deb10u2) ...
#0 60.00 Selecting previously unselected package gpg.
#0 60.01 Preparing to unpack .../11-gpg_2.2.12-1+deb10u2_arm64.deb ...
#0 60.01 Unpacking gpg (2.2.12-1+deb10u2) ...
#0 60.09 Selecting previously unselected package pinentry-curses.
#0 60.09 Preparing to unpack .../12-pinentry-curses_1.1.0-2_arm64.deb ...
#0 60.09 Unpacking pinentry-curses (1.1.0-2) ...
#0 60.14 Selecting previously unselected package gpg-agent.
#0 60.14 Preparing to unpack .../13-gpg-agent_2.2.12-1+deb10u2_arm64.deb ...
#0 60.14 Unpacking gpg-agent (2.2.12-1+deb10u2) ...
#0 60.20 Selecting previously unselected package gpg-wks-client.
#0 60.21 Preparing to unpack .../14-gpg-wks-client_2.2.12-1+deb10u2_arm64.deb ...
#0 60.21 Unpacking gpg-wks-client (2.2.12-1+deb10u2) ...
#0 60.25 Selecting previously unselected package gpg-wks-server.
#0 60.25 Preparing to unpack .../15-gpg-wks-server_2.2.12-1+deb10u2_arm64.deb ...
#0 60.25 Unpacking gpg-wks-server (2.2.12-1+deb10u2) ...
#0 60.29 Selecting previously unselected package gpgsm.
#0 60.29 Preparing to unpack .../16-gpgsm_2.2.12-1+deb10u2_arm64.deb ...
#0 60.29 Unpacking gpgsm (2.2.12-1+deb10u2) ...
#0 60.33 Selecting previously unselected package gnupg.
#0 60.33 Preparing to unpack .../17-gnupg_2.2.12-1+deb10u2_all.deb ...
#0 60.33 Unpacking gnupg (2.2.12-1+deb10u2) ...
#0 60.40 Setting up libksba8:arm64 (1.3.5-2+deb10u2) ...
#0 60.41 Setting up lsb-base (10.2019051400) ...
#0 60.41 Setting up libsqlite3-0:arm64 (3.27.2-3+deb10u2) ...
#0 60.42 Setting up libnpth0:arm64 (1.6-1) ...
#0 60.42 Setting up libassuan0:arm64 (2.5.2-1) ...
#0 60.42 Setting up gnupg-l10n (2.2.12-1+deb10u2) ...
#0 60.43 Setting up readline-common (7.0-5) ...
#0 60.44 Setting up libreadline7:arm64 (7.0-5) ...
#0 60.44 Setting up gnupg-utils (2.2.12-1+deb10u2) ...
#0 60.45 Setting up pinentry-curses (1.1.0-2) ...
#0 60.50 Setting up gpgconf (2.2.12-1+deb10u2) ...
#0 60.50 Setting up gpg (2.2.12-1+deb10u2) ...
#0 60.51 Setting up gpg-agent (2.2.12-1+deb10u2) ...
#0 60.51 Setting up gpgsm (2.2.12-1+deb10u2) ...
#0 60.52 Setting up dirmngr (2.2.12-1+deb10u2) ...
#0 60.54 Setting up gpg-wks-server (2.2.12-1+deb10u2) ...
#0 60.54 Setting up gpg-wks-client (2.2.12-1+deb10u2) ...
#0 60.55 Setting up gnupg (2.2.12-1+deb10u2) ...
#0 60.56 Processing triggers for libc-bin (2.28-10+deb10u2) ...
#0 60.91   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#0 60.91                                  Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: apt-key output should not be parsed (stdout is not a terminal)
100   989    0   989    0     0    273      0 --:--:--  0:00:03 --:--:--   273
#0 64.99 OK
#0 65.57 Hit:1 http://deb.debian.org/debian buster InRelease
#0 65.71 Hit:2 http://deb.debian.org/debian-security buster/updates InRelease
#0 65.84 Hit:3 http://deb.debian.org/debian buster-updates InRelease
#0 66.02 Get:4 https://pkg.contrastsecurity.com/debian-public all InRelease [3,324 B]
#0 66.14 Fetched 3,324 B in 1s (3,044 B/s)
#0 66.14 Reading package lists...
#0 66.89 Reading package lists...
#0 67.43 Building dependency tree...
#0 67.51 Reading state information...
#0 67.56 E: Unable to locate package contrast-java-agent
------
failed to solve: executor failed running [/bin/sh -c apt-get update   && apt-get install -y gnupg   && curl https://pkg.contrastsecurity.com/api/gpg/key/public | apt-key add -   && echo "deb https://pkg.contrastsecurity.com/debian-public/ all contrast" > /etc/apt/sources.list.d/contrast-all.list   && apt-get update   && apt-get install -y contrast-java-agent]: exit code: 100

@asankov
Copy link
Contributor

asankov commented Feb 26, 2023

@Obasoro What is your environment - OS, OS version, CPU arch, etc?

@Obasoro
Copy link
Contributor Author

Obasoro commented Feb 26, 2023

OS-Macbook Pro M1 chip
darwin

@asankov
Copy link
Contributor

asankov commented Feb 26, 2023

I see. I think this is due to the Apple Silicon CPU. There is another issue on the upstream project that complains about the same things - rstatsinger/contrast-java-webgoat-docker#5

As a workaround, you can try running this on another machine (if you have one) or on a VM (local or in the cloud).

@asankov
Copy link
Contributor

asankov commented Feb 26, 2023

Unfortunately, I don't have access to an M1 or M2 machine, so I cannot reproduce it or debug it further. We will have to wait for upstream to take a look at the issue and fix it.

@Obasoro
Copy link
Contributor Author

Obasoro commented Feb 27, 2023

Thanks @asankov. Keep me update if the upstream work on it. Also, I would move to test it on WSL.

@MichaelCade
Copy link
Owner

I believe this can be closed now as there is a fix? Please confirm and I will close the issue.

@Obasoro
Copy link
Contributor Author

Obasoro commented Mar 22, 2023

So far we would wait till there is a fix. I would keep trying/going back to it and checking for a possible solution.
@asankov

@asankov
Copy link
Contributor

asankov commented Mar 22, 2023

@MichaelCade, it does not look like there is any activity on the original issue - rstatsinger/contrast-java-webgoat-docker#5. Why did you think there is a fix? Did you saw something else?

@MichaelCade
Copy link
Owner

Sorry my bad there was another PR raised #375 but not related to this issue.

@MichaelCade
Copy link
Owner

Any update on this?

@asankov
Copy link
Contributor

asankov commented Jul 20, 2023

There's no activity on the upstream issue.

I actually have access to an M1 MacBook now, so I can try to reproduce it next week and see the results.

@nb083
Copy link

nb083 commented Jul 30, 2023

@asankov I have attached the error log screenshot.

Screenshot 2023-02-26 at 10 09 02

title: Choosing who owns and pays for codespaces in your organization
shortTitle: 'Billing and ownership'
intro: 'You can choose whether codespaces are paid for and owned by your organization or by your members.'
permissions: 'Organization owners can change an organization''s billing details and control who owns and pays for codespaces.'
versions:
fpt: ''
ghec: '
'
type: how_to
topics:

  • Codespaces
  • Billing
  • Administrator
    product: 'Organizations on {% data variables.product.prodname_team %} and {% data variables.product.prodname_enterprise %} plans can pay for their members'' use of {% data variables.product.prodname_github_codespaces %}. These organizations can then access policies that apply to codespaces paid for by the organization. For more information, see "AUTOTITLE."'

Overview

If you're the owner of an organization on a {% data variables.product.prodname_team %} or {% data variables.product.prodname_ghe_cloud %} plan, you can pay for your members' and collaborators' usage of {% data variables.product.prodname_github_codespaces %}. Paying for usage will allow people to use {% data variables.product.prodname_github_codespaces %} to work in your repositories without having to do so at their own expense, and will give your organization more control over the codespaces created from your repositories.

To pay for usage, you must do all of the following things.

  • Allow at least some of your members and collaborators to use {% data variables.product.prodname_github_codespaces %} in your organization's private {% ifversion ghec %}and internal {% endif %}repositories. For more information, see "AUTOTITLE."
  • Choose for codespaces created from your organization's repositories to be organization-owned. For more information, see "Choosing who owns and pays for codespaces."
  • Set a non-zero spending limit for {% data variables.product.prodname_github_codespaces %}. For more information, see "AUTOTITLE."

About choosing who pays for codespaces

Paying for a codespace means paying for the storage and compute costs of the codespace over the codespace's lifetime. For more information, see "AUTOTITLE."

Organizations on a {% data variables.product.prodname_free_team %} plan cannot pay for {% data variables.product.prodname_github_codespaces %}, so the user who creates the codespace always pays.

For organizations on a {% data variables.product.prodname_team %} or {% data variables.product.prodname_ghe_cloud %} plan, when a user creates a codespace from a repository in the organization, either the user or the organization can pay for the codespace. The user who creates a codespace can't choose who pays for it, but the organization can choose to pay for certain users. In an organization's settings, you can choose for codespaces to be user-owned or organization-owned.

If an organization chooses for codespaces to be user-owned, a user who creates a codespace from a repository in the organization always pays for the codespace. The user's access to create codespaces depends on the visibility of the repository and your organization's access settings.

If an organization chooses for codespaces to be organization-owned, the organization will pay for a codespace if all the following things are true.

{% data reusables.codespaces.when-an-org-pays %}

For more information about enabling {% data variables.product.prodname_github_codespaces %} for members and collaborators, see "AUTOTITLE."

{% ifversion ghec %}
{% note %}

Note: If you own an {% data variables.enterprise.prodname_emu_org %}, and do not allow {% data variables.product.prodname_github_codespaces %} to be billed to your organization, members with {% data variables.enterprise.prodname_managed_users %} will not be able to use {% data variables.product.prodname_github_codespaces %}. For more information, see "AUTOTITLE."

{% endnote %}
{% endif %}

About ownership of codespaces

A codespace is paid for by the account that owns it. The codespace owner can be the user who created the codespace, or it can be an organization.

If your organization owns a codespace, your organization has control over that codespace. For example, for codespaces owned by your organization, you can:

  • Use the REST API to manage codespaces, such as stopping or deleting a codespace
  • Access audit logs to review actions related to {% data variables.product.prodname_github_codespaces %}
  • Set policies to manage constraints, such as restricting the base image or machine type that can be used in codespaces, or setting a default timeout and retention period

If a user owns a codespace, your organization does not have any of these options for managing the codespace, even if the codespace was created from one of your organization's repositories.

When a user creates a codespace, they're told who will pay for it, and therefore who owns it. From a user's point of view, apart from the policies your organization can use to set constraints on codespaces, the experience with {% data variables.product.prodname_github_codespaces %} will be similar regardless of who owns a codespace. For example, most of a user's personal settings for {% data variables.product.prodname_github_codespaces %}, such as dotfiles, encrypted secrets, and GPG verification, apply regardless of who owns the codespace.

About changing your settings

When you change your ownership settings, existing codespaces can transfer to a new owner.

If you change from organization ownership to user ownership, codespaces that are currently owned by your organization will be transferred to the ownership of the user who created the codespace. Before you make this change, you should ask each user to review the codespaces that will be transferred to their ownership. These codespaces will now incur usage on the user's personal account.

If you change from user ownership to organization ownership, existing codespaces may be transferred to your organization's ownership. A codespace will be transferred if the user who currently owns the codespace is a member or collaborator, and you have enabled {% data variables.product.prodname_github_codespaces %} for this user. Otherwise, a codespace will remain under the ownership of the user.

Choosing who owns and pays for codespaces

{% note %}

Note: If you cannot access the option to make codespaces organization-owned, this may be because you have disabled {% data variables.product.prodname_github_codespaces %} for all users in your organization's private{% ifversion ghec %} and internal{% endif %} repositories. For more information, see "About choosing who pays for codespaces."

{% endnote %}

{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
{% data reusables.organizations.click-codespaces %}
{% data reusables.organizations.click-general %}

  1. On the {% data variables.product.prodname_codespaces %} settings page, under "Codespace ownership," select the setting you want for your organization:

    • Organization ownership: Codespaces can be owned and paid for by your organization.
    • User ownership: Codespaces are always owned and paid for by the user who creates the codespace.
  2. Optionally, under "Codespaces access," review the members and collaborators for whom you have enabled {% data variables.product.prodname_codespaces %}. These are the only users who can create codespaces that your organization pays for. For more information, see "AUTOTITLE."

Setting a spending limit

{% data reusables.codespaces.codespaces-spending-limit-requirement %}

For information on managing and changing your account's spending limit, see "AUTOTITLE."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants