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

Support for AWS CodePipeline #100

Closed
aponcz opened this issue May 27, 2021 · 7 comments
Closed

Support for AWS CodePipeline #100

aponcz opened this issue May 27, 2021 · 7 comments

Comments

@aponcz
Copy link

aponcz commented May 27, 2021

How would one go about getting Lamby working with AWS Code Pipeline, more specifically CodeBuild. I'm encountering the following error:

Creating network "src_default" with the default driver
--
75 | Building socket
76 | Step 1/8 : FROM amazon/aws-sam-cli-build-image-ruby2.7
77 | latest: Pulling from amazon/aws-sam-cli-build-image-ruby2.7
78 | Digest: sha256:ad2f34851f004b92448cf4334fe2d312960f52e17cbc32231292b0e915ae979f
79 | Status: Downloaded newer image for amazon/aws-sam-cli-build-image-ruby2.7:latest
80 | ---> eb23e25775d9
81 | Step 2/8 : ARG HOST_UID
82 | ---> Running in 15ff0f44dc96
83 | Removing intermediate container 15ff0f44dc96
84 | ---> c98987b652a5
85 | Step 3/8 : ARG HOST_GID
86 | ---> Running in a3cf2b67181e
87 | Removing intermediate container a3cf2b67181e
88 | ---> 07a25f6f9cfd
89 | Step 4/8 : RUN mkdir /lamby     && /usr/sbin/groupadd --gid $HOST_GID --system --force lamby     && /usr/sbin/useradd --uid $HOST_UID --gid $HOST_GID --non-unique --home-dir /lamby --shell /bin/bash --system lamby     && chown $HOST_UID:$HOST_GID /lamby
90 | ---> Running in d9e9fe139f10
91 | groupadd: invalid group ID '--system'
92 | Service 'socket' failed to build: The command '/bin/sh -c mkdir /lamby     && /usr/sbin/groupadd --gid $HOST_GID --system --force lamby     && /usr/sbin/useradd --uid $HOST_UID --gid $HOST_GID --non-unique --home-dir /lamby --shell /bin/bash --system lamby     && chown $HOST_UID:$HOST_GID /lamby' returned a non-zero code: 3
93 |  
94 | [Container] 2021/05/26 22:52:14 Command did not exit successfully ./bin/setup exit status 1
95 | [Container] 2021/05/26 22:52:14 Phase complete: BUILD State: FAILED
@metaskills
Copy link
Member

Please see here and let me know if you still have questions. #94 (comment)

@metaskills
Copy link
Member

Or better yet, this one #95

@metaskills
Copy link
Member

Gonna close this hoping the links above are the answers. If not, lemme know.

@aponcz
Copy link
Author

aponcz commented Jun 1, 2021

Thanks @metaskills - I managed to get this working in CodeBuild. Here are the updates that needed to be made:

Dockerfile-build

ENV HOST_GID=0
ENV HOST_UID=0

buildspec.yml

version: 0.2

phases:
  build:
    commands:
      - ./bin/setup
      - ./bin/deploy

@metaskills metaskills reopened this Jun 1, 2021
@metaskills
Copy link
Member

Oh, that is interesting. Re-opened. I would have expected Linux to work as is based on this work. https://github.com/customink/lamby-cookiecutter/pull/11/files

@metaskills
Copy link
Member

Related on the CodeDeploy side when using a linear DeploymentPreference aws/aws-sam-cli#2761

@metaskills
Copy link
Member

Not going to worry about CodePipeline. Ping me if you want to contribute here.

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

2 participants