Skip to content

Commit d8255c6

Browse files
committed
fix: awscliv2 + build from pushed base
1 parent f868ae3 commit d8255c6

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ jobs:
2222
TAG=${{ github.event.release.tag_name }}
2323
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
2424
25-
- name: devops
25+
- name: base
2626
uses: docker/build-push-action@v4.0.0
2727
with:
2828
context: src
2929
push: true
30-
target: devops
30+
target: base
3131
build-args: IMAGE_VERSION=${{ env.VERSION }}
32-
tags: ghcr.io/${{ github.repository }}:${{ env.VERSION }}-devops,ghcr.io/${{ github.repository }}:devops
32+
tags: ghcr.io/${{ github.repository }}:${{ env.VERSION }},ghcr.io/${{ github.repository }}:latest
3333

34-
- name: base
34+
- name: devops
3535
uses: docker/build-push-action@v4.0.0
3636
with:
3737
context: src
3838
push: true
39-
target: base
39+
target: devops
4040
build-args: IMAGE_VERSION=${{ env.VERSION }}
41-
tags: ghcr.io/${{ github.repository }}:${{ env.VERSION }},ghcr.io/${{ github.repository }}:latest
41+
tags: ghcr.io/${{ github.repository }}:${{ env.VERSION }}-devops,ghcr.io/${{ github.repository }}:devops
4242

4343
- name: dotnet-6
4444
uses: docker/build-push-action@v4.0.0

src/Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ ARG HOME=/home/$USER
77

88
RUN microdnf update -y && \
99
microdnf install -y --nodocs --setopt install_weak_deps=0 \
10-
systemd tar bash-completion git micro jq dnsutils htop which procps-ng \
10+
systemd tar unzip bash-completion git micro jq dnsutils htop which procps-ng \
1111
podman podman-compose slirp4netns fuse-overlayfs --exclude container-selinux && \
12-
microdnf clean all && \
13-
rpm --setcaps shadow-utils 2>/dev/null && \
14-
rm -rf /var/cache /var/log/dnf* /var/log/yum.*
12+
rpm --setcaps shadow-utils 2>/dev/null
1513

1614
RUN adduser $USER && chown $USER -R $HOME && \
1715
echo -e "$USER:1:999\n$USER:1001:64535" > /etc/subuid; \
@@ -85,7 +83,7 @@ RUN echo '. $HOME/.custom.sh' >> .bashrc
8583

8684
# VARIANT - DOTNET
8785

88-
FROM base as dotnet-base
86+
FROM ghcr.io/queil/image:latest as dotnet-base
8987

9088
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
9189
ENV DOTNET_NOLOGO=true
@@ -96,22 +94,22 @@ RUN code-server --install-extension Ionide.Ionide-fsharp
9694
FROM dotnet-base as dotnet-6
9795

9896
USER root
99-
RUN microdnf update -y && microdnf install -y --nodocs --setopt install_weak_deps=0 dotnet-sdk-6.0 && microdnf clean all && rm -rf /var/cache/yum
97+
RUN microdnf install -y --nodocs --setopt install_weak_deps=0 dotnet-sdk-6.0 && microdnf clean all && rm -rf /var/cache/yum
10098
USER queil
10199

102-
FROM base as dotnet-7
100+
FROM ghcr.io/queil/image:latest as dotnet-7
103101

104102
USER root
105-
RUN microdnf update -y && microdnf install -y --nodocs --setopt install_weak_deps=0 dotnet-sdk-7.0 && microdnf clean all && rm -rf /var/cache/yum
103+
RUN microdnf install -y --nodocs --setopt install_weak_deps=0 dotnet-sdk-7.0 && microdnf clean all && rm -rf /var/cache/yum
106104
USER queil
107105

108106
# VARIANT - RUST
109107

110-
FROM base as rust
108+
FROM ghcr.io/queil/image:latest as rust
111109

112110
USER root
113111

114-
RUN microdnf -y update && microdnf install -y --nodocs --setopt install_weak_deps=0 gcc && \
112+
RUN microdnf install -y --nodocs --setopt install_weak_deps=0 gcc && \
115113
microdnf clean all && \
116114
rm -rf /var/cache /var/log/dnf* /var/log/yum.*
117115

@@ -126,17 +124,17 @@ RUN code-server --install-extension rust-lang.rust-analyzer && \
126124

127125
# VARIANT - PYTHON
128126

129-
FROM base as python
127+
FROM ghcr.io/queil/image:latest as python
130128

131129
USER root
132-
RUN microdnf update -y && microdnf install -y --nodocs --setopt install_weak_deps=0 poetry && microdnf clean all && rm -rf /var/cache/yum
130+
RUN microdnf install -y --nodocs --setopt install_weak_deps=0 poetry && microdnf clean all && rm -rf /var/cache/yum
133131
USER queil
134132

135133
RUN code-server --install-extension ms-python.python
136134

137135
# VARIANT - DEVOPS
138136

139-
FROM base as devops
137+
FROM ghcr.io/queil/image:latest as devops
140138

141139
ARG SOPS_VER=3.7.3
142140
ARG AWS_VAULT_VER=7.2.0
@@ -150,6 +148,8 @@ RUN curl -sSL https://github.com/mozilla/sops/releases/download/v${SOPS_VER}/sop
150148
chmod +x /usr/bin/sops && \
151149
curl -sSL https://github.com/99designs/aws-vault/releases/download/v${AWS_VAULT_VER}/aws-vault-linux-amd64 -o /usr/bin/aws-vault && \
152150
chmod +x /usr/bin/aws-vault && \
153-
microdnf update -y && microdnf install -y --nodocs --setopt install_weak_deps=0 awscli2 && microdnf clean all && rm -rf /var/cache/yum
151+
curl -sSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip && \
152+
unzip awscliv2.zip && \
153+
./aws/install
154154

155155
USER queil

0 commit comments

Comments
 (0)