Skip to content

Commit

Permalink
fix: fixed appuser missing home dir (#40)
Browse files Browse the repository at this point in the history
* fix: fixed appuser missing home dir

* Update docs/docker.md

Co-authored-by: caroldelwing <[email protected]>

---------

Co-authored-by: caroldelwing <[email protected]>
  • Loading branch information
karl-cardenas-coding and caroldelwing authored Jun 28, 2024
1 parent dd2aa4f commit e57e5fa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PALETTE_VERSION: 4.0.2
PALETTE_CLI_VERSION: 4.3.7
PALETTE_EDGE_VERSION: 4.3.2
PALETTE_CLI_VERSION: 4.4.0
PALETTE_EDGE_VERSION: 4.4.2
PACKER_VERSION: 1.11.0
ORAS_VERSION: 1.0.0
TERRAFORM_VERSION: 1.8.4
TERRAFORM_VERSION: 1.9.0
PALETTE_REGISTRY_CLI_VERSION: 4.3.0

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:
env:
GITHUB_TOKEN: ${{ github.token }}
PALETTE_VERSION: 4.0.2
PALETTE_CLI_VERSION: 4.3.7
PALETTE_EDGE_VERSION: 4.3.2
PALETTE_CLI_VERSION: 4.4.0
PALETTE_EDGE_VERSION: 4.4.2
PACKER_VERSION: 1.11.0
ORAS_VERSION: 1.0.0
TERRAFORM_VERSION: 1.8.4
TERRAFORM_VERSION: 1.9.0
PALETTE_REGISTRY_CLI_VERSION: 4.3.0

concurrency:
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ ENV REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd-basic
COPY --from=server /registry /usr/local/bin/
COPY --from=server /etc/spectro/config.yml /etc/spectro/config.yml

RUN adduser -H -u 1002 -D appuser appuser && \
RUN adduser -u 1002 -D appuser appuser && \
apk update && \
apk add --no-cache bash curl git openssl jq bind-tools wget ca-certificates nano aws-cli xorriso govc podman


RUN wget https://spectro-cli.s3.amazonaws.com/v$PALETTE_REGISTRY_CLI_VERSION/linux/spectro && \
mv spectro /usr/local/bin/spectro && \
chmod +x /usr/local/bin/spectro && \
Expand All @@ -48,8 +49,8 @@ RUN wget https://spectro-cli.s3.amazonaws.com/v$PALETTE_REGISTRY_CLI_VERSION/li
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl && \
mkdir -p ~/.config/ngrok && \
cp /auth/ngrok.yml ~/.config/ngrok/ngrok.yml && \
mkdir -p /home/appuser/.config/ngrok && \
cp /auth/ngrok.yml /home/appuser/.config/ngrok/ngrok.yml && \
wget https://software.spectrocloud.com/palette-cli/v$PALETTE_CLI_VERSION/linux/cli/palette && \
mv palette /usr/local/bin/palette && \
chmod +x /usr/local/bin/palette && \
Expand All @@ -65,7 +66,8 @@ RUN wget https://spectro-cli.s3.amazonaws.com/v$PALETTE_REGISTRY_CLI_VERSION/li
rm -rf /var/cache/apk/* && \
wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin && \
rm -rf terraform_${TERRAFORM_VERSION}_linux_amd64.zip
rm -rf terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
mkdir -p /var/log/ && chmod 777 /var/log/

ADD https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip /usr/local/sbin/
RUN unzip /usr/local/sbin/packer_${PACKER_VERSION}_linux_amd64.zip -d /usr/local/sbin && \
Expand Down
2 changes: 1 addition & 1 deletion docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ registry serve /etc/spectro/config.yml > /var/log/registry.log 2>&1 &
If you are wanting to build the docker image locally you must provide the the build arguments for `PALETTE_VERSION`, `PALETTE_CLI_VERSION`, `PALETTE_EDGE_VERSION`, `PACKER_VERSION`, `ORAS_VERSION` and `TERRAFORM_VERSION`. Use the following command to build a local image. Replace the versions as needed.

```shell
docker build --build-arg PALETTE_VERSION=4.0.2 --build-arg PALETTE_CLI_VERSION=4.2.2 --build-arg PALETTE_EDGE_VERSION=4.2.3 --build-arg PACKER_VERSION=1.9.4 --build-arg ORAS_VERSION=1.0.0 --build-arg PALETTE_REGISTRY_CLI_VERSION=4.2.0 --build-arg TERRAFORM_VERSION=1.7.0 -t tutorials .
docker build --build-arg PALETTE_VERSION=4.0.2 --build-arg PALETTE_CLI_VERSION=4.4.0 --build-arg PALETTE_EDGE_VERSION=4.4.2 --build-arg PACKER_VERSION=1.11.0 --build-arg ORAS_VERSION=1.0.0 --build-arg PALETTE_REGISTRY_CLI_VERSION=4.3.0 --build-arg TERRAFORM_VERSION=1.9.0 -t tutorials .
```

0 comments on commit e57e5fa

Please sign in to comment.