Skip to content

Commit

Permalink
Fix invalid docker files (#4590)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin committed Jul 6, 2022
1 parent 4c6ff74 commit 4efc62b
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 61 deletions.
8 changes: 4 additions & 4 deletions docker/all/ubuntu/Dockerfile
@@ -1,9 +1,10 @@
FROM azsdkengsys.azurecr.io/azuresdk/autorest

# DOTNET
ENV DOTNET_VERSION=5.0
ENV DOTNET_VERSION=6.0

RUN apt-get update \
RUN echo 'deb http://security.ubuntu.com/ubuntu impish-security main' | tee /etc/apt/sources.list.d/impish-security.list && \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
ca-certificates \
Expand All @@ -12,7 +13,6 @@ RUN apt-get update \
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu66 \
libssl1.1 \
libstdc++6 \
zlib1g \
Expand All @@ -23,7 +23,7 @@ RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel ${


# PYTHON
ENV PYTHON_VERSION=3.8
ENV PYTHON_VERSION=3.10

RUN apt-get update && apt-get install -y \
python${PYTHON_VERSION} \
Expand Down
6 changes: 3 additions & 3 deletions docker/dotnet/ubuntu/Dockerfile
@@ -1,8 +1,9 @@
FROM azsdkengsys.azurecr.io/azuresdk/autorest

ENV DOTNET_VERSION=5.0
ENV DOTNET_VERSION=6.0

RUN apt-get update \
RUN echo 'deb http://security.ubuntu.com/ubuntu impish-security main' | tee /etc/apt/sources.list.d/impish-security.list && \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
ca-certificates \
Expand All @@ -11,7 +12,6 @@ RUN apt-get update \
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu66 \
libssl1.1 \
libstdc++6 \
zlib1g \
Expand Down
2 changes: 1 addition & 1 deletion docker/python/ubuntu/Dockerfile
@@ -1,6 +1,6 @@
FROM azsdkengsys.azurecr.io/azuresdk/autorest

ENV PYTHON_VERSION=3.8
ENV PYTHON_VERSION=3.10

RUN apt-get update && apt-get install -y \
python${PYTHON_VERSION} \
Expand Down
14 changes: 7 additions & 7 deletions docs/docker.md
Expand Up @@ -2,13 +2,13 @@

AutoRest provide some docker images:

| Image | Description | Image size | Ubuntu |
| -------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------ |
| `azuresdk/autorest` | Base image with node installed | ![](https://img.shields.io/docker/image-size/azuresdk/autorest) | :heavy_check_mark: |
| `azuresdk/autorest-python` | Base image + python 3 For building python sdk | ![](https://img.shields.io/docker/image-size/azuresdk/autorest-python) | :heavy_check_mark: |
| `azuresdk/autorest-dotnet` | Base image + dotnet. For building csharp sdk | ![](https://img.shields.io/docker/image-size/azuresdk/autorest-dotnet) | :heavy_check_mark: |
| `azuresdk/autorest-java` | Base image + java. For building java sdk | ![](https://img.shields.io/docker/image-size/azuresdk/autorest-java) | :heavy_check_mark: |
| `azuresdk/autorest-all` | Base image with all the languages for building any of the sdk above | ![](https://img.shields.io/docker/image-size/azuresdk/autorest-all) | :heavy_check_mark: |
| Image | Description | Ubuntu |
| ------------------------------------------------- | ------------------------------------------------------------------- | ------------------ |
| `azsdkengsys.azurecr.io/azuresdk/autorest` | Base image with node installed | :heavy_check_mark: |
| `azsdkengsys.azurecr.io/azuresdk/autorest-python` | Base image + python 3 For building python sdk | :heavy_check_mark: |
| `azsdkengsys.azurecr.io/azuresdk/autorest-dotnet` | Base image + dotnet. For building csharp sdk | :heavy_check_mark: |
| `azsdkengsys.azurecr.io/azuresdk/autorest-java` | Base image + java. For building java sdk | :heavy_check_mark: |
| `azsdkengsys.azurecr.io/azuresdk/autorest-all` | Base image with all the languages for building any of the sdk above | :heavy_check_mark: |

## Usage

Expand Down
66 changes: 33 additions & 33 deletions eng/pipelines/publish.yaml
Expand Up @@ -37,36 +37,36 @@ stages:
- script: |
NPM_AUTH_TOKEN="$(azure-sdk-npm-token)" npx @microsoft/rush publish --publish --include-all --set-access-level public --tag next
displayName: Publish packages
# - stage: Docker
# dependsOn: npm
# jobs:
# - template: ./templates/build-and-push-docker.yaml
# parameters:
# name: base
# image: azuresdk/autorest
# dockerFolder: ./docker/base/ubuntu
# readmePath: docker/base/readme.md
# - template: ./templates/build-and-push-docker.yaml
# parameters:
# name: dotnet
# image: azuresdk/autorest-dotnet
# dockerFolder: ./docker/dotnet/ubuntu
# readmePath: docker/dotnet/readme.md
# - template: ./templates/build-and-push-docker.yaml
# parameters:
# name: python
# image: azuresdk/autorest-python
# dockerFolder: ./docker/python/ubuntu
# readmePath: docker/python/readme.md
# - template: ./templates/build-and-push-docker.yaml
# parameters:
# name: java
# image: azuresdk/autorest-java
# dockerFolder: ./docker/java/ubuntu
# readmePath: docker/java/readme.md
# - template: ./templates/build-and-push-docker.yaml
# parameters:
# name: all
# image: azuresdk/autorest-all
# dockerFolder: ./docker/all/ubuntu
# readmePath: docker/all/readme.md
- stage: Docker
dependsOn: npm
jobs:
- template: ./templates/build-and-push-docker.yaml
parameters:
name: base
image: azsdkengsys.azurecr.io/azuresdk/autorest
dockerFolder: ./docker/base/ubuntu
readmePath: docker/base/readme.md
- template: ./templates/build-and-push-docker.yaml
parameters:
name: dotnet
image: azsdkengsys.azurecr.io/azuresdk/autorest-dotnet
dockerFolder: ./docker/dotnet/ubuntu
readmePath: docker/dotnet/readme.md
- template: ./templates/build-and-push-docker.yaml
parameters:
name: python
image: azsdkengsys.azurecr.io/azuresdk/autorest-python
dockerFolder: ./docker/python/ubuntu
readmePath: docker/python/readme.md
- template: ./templates/build-and-push-docker.yaml
parameters:
name: java
image: azsdkengsys.azurecr.io/azuresdk/autorest-java
dockerFolder: ./docker/java/ubuntu
readmePath: docker/java/readme.md
- template: ./templates/build-and-push-docker.yaml
parameters:
name: all
image: azsdkengsys.azurecr.io/azuresdk/autorest-all
dockerFolder: ./docker/all/ubuntu
readmePath: docker/all/readme.md
18 changes: 5 additions & 13 deletions eng/pipelines/templates/build-and-push-docker.yaml
Expand Up @@ -17,9 +17,11 @@ jobs:
inputs:
dockerVersion: "17.09.0-ce"

- script: |
echo "$(DockerHub-azuresdkPass)" | docker login -u "azuresdk" --password-stdin
displayName: Login to docker hub.
- task: Docker@2
displayName: Login to ACR
inputs:
command: login
containerRegistry: azsdkengsys

- script: |
docker build -t ${{ parameters.image }} .
Expand All @@ -29,13 +31,3 @@ jobs:
- script: |
docker push ${{ parameters.image }}
displayName: Publish image
- script: |
echo '/workspace/${{parameters.readmePath}}'
docker run -v $PWD:/workspace \
-e DOCKERHUB_USERNAME="azuresdk" \
-e DOCKERHUB_PASSWORD="$(DockerHub-azuresdkPass)" \
-e DOCKERHUB_REPOSITORY='${{ parameters.image }}' \
-e README_FILEPATH='/workspace/${{parameters.readmePath}}' \
peterevans/dockerhub-description:2.1.0
displayName: Update readme

0 comments on commit 4efc62b

Please sign in to comment.